Page 1 of 1

Truncation of data...?

Posted: Sun Jan 04, 2009 11:00 am
by cyandi_man
Hi guys, i have a php form that pull data from mySql database.
for some reason this info is being truncated.

ex. in the zipcode field only first 3 numbers show up
and only the first part of the street address shows up.

I do have that particular cell as VARCHAR so that i can have both numbers and letters as data

do spaces in the data have anything to do with it?
please advise - thanks!

** also my field size on the php form is more than enough to contain this data...so i doubt that is the issue here.

Re: Truncation of data...?

Posted: Sun Jan 04, 2009 12:05 pm
by John Cartwright
Sounds to me like you are not quoting your value fields (assuming this is a form).

Code: Select all

<input ....     value=<?php echo $row['your_field_name']; ?> />
versus

Code: Select all

<input ....     value="<?php echo $row['your_field_name']; ?>" />
Otherwise, check your database schema to make sure you set the varchar's length long enough.