If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > an html table field "telephone" eg 46799999666, appear it 4.678E09

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-09, 13:36
lse123 lse123 is offline
Registered User
 
Join Date: May 2007
Posts: 139
an html table field "telephone" eg 46799999666, appear it 4.678E09

when I appear data in webpage from mysql database table [phpmyadmin webbased] in an html table field "telephone" eg 46799999666, appear it 4.678E09 well how appear actual number plain and whole?
Reply With Quote
  #2 (permalink)  
Old 12-05-09, 13:57
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
so how have you defined the column that is storing the telephone number
my expectation is that you have stored it as a numeric type, rather than a text/character type
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 12-05-09, 14:16
lse123 lse123 is offline
Registered User
 
Join Date: May 2007
Posts: 139
mob varchar(25) utf8_general_ci Yes NULL
fixed varchar(25) utf8_general_ci Yes NULL

But I declared as above, any idea of error ? other records tests have letters in such fields ...?
Reply With Quote
  #4 (permalink)  
Old 12-05-09, 14:16
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
if you do not need to find the total of all telephone numbers (hint: you don't) or the average telephone number (hint: you don't) then you don't need to use a numeric datatype
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 12-05-09, 14:17
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
Quote:
Originally Posted by lse123 View Post
But I declared as above, any idea of error ?
phpmyadmin sucks

there's your answer right there

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #6 (permalink)  
Old 12-05-09, 14:46
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
OK so if the column is defined as varchar, then the problem is the variable data type you are using to store or manipulate the phone number in the front end
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #7 (permalink)  
Old 12-07-09, 17:39
lse123 lse123 is offline
Registered User
 
Join Date: May 2007
Posts: 139
I used:
$mob = mysql_result($result,$i,"mob");
$fixed = mysql_result($result,$i,"fixed");
.................................................. ...............
<td><?=$mob; ?></td>
<td><?=$fixed; ?></td>
well, I did error where ? there are entries in phone numbers with letters, these appeare strings, normally just this record the problem ... 4.78E09
Reply With Quote
  #8 (permalink)  
Old 12-08-09, 01:57
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
OK
so where is the fault here
is it in the data
...if so is that because of the way the data is stored (IE the way the column is defiend in the table)
...or is it in the way the data was set. what is the insert statement you used
is it in the presentation layer

you need to do some analysis of the problem to find where the fault lies

to do that it may help to get a copy of the MySQL GUI tools, which includes Administrator and Query Browser.. use the Query Browser to find what the data actaully is inside the server.
use Administrator to find what the coliumns actually are defined as

if the telephone numbers appear correctly in the Query Browser then you presume the fault lies in your presentation layer, or how you get the data from the server.
if the telephone number is incorrect then reither its wrongly defined in the server OR its in the presentation layer that set the value.

just taking a wild guess, have you changed the column type from say a single or double precision number to varchar with data already in it?
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #9 (permalink)  
Old 12-09-09, 17:14
lse123 lse123 is offline
Registered User
 
Join Date: May 2007
Posts: 139
WELL MAY the table field prior be int converted to string... a new problem:
When I have a text area and somebody types in without space when appeared data in html table the structure modified to fullfill the long word like typing
"ffffffffffffffffffffffffffffffffffggggggggggggggg gggggggggggggggfffffffffffffffffffffffffffffgggggg ggggggggggggggggggggggggfffffffffff"
well is any way from textarea text get cut in the middle so presentation of data appear normal ?

Last edited by lse123; 12-14-09 at 03:42.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On