[PHP] Trunkated zeros..... how to fix?

2001-09-05 Thread Dallas K.

I am having the problem that Mysql is truncating the zeros from both the int and char 
fields when I try to insert How can I fix this.

example:

0123 in PHP = 123 in mysql
3210 in PHP = 321 in mysql 

but I need that zero  how do I keep mysql from doing this?



Re: [PHP] Trunkated zeros..... how to fix?

2001-09-05 Thread ERISEN, Mehmet Kamil

use zerofill for the column when you create the table!
--- Dallas K. [EMAIL PROTECTED] wrote:
 I am having the problem that Mysql is truncating the
 zeros from both the int and char fields when I try to
 insert How can I fix this.
 
 example:
 
 0123 in PHP = 123 in mysql
 3210 in PHP = 321 in mysql 
 
 but I need that zero  how do I keep mysql from doing
 this?
 


=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]