Thanks buddylee17,
Well, I wanted to add leading zero in the numeric datatype only. because I should insert it into MySql database BIGINT data field.
Is there any way to insert the numeric/string value with leading zero into MYSQL BIGINT field ? If I insert a string of "0123456" this BIGINT field removes leading 0 and showing only 123456. how to make it show this 0 without enabling unsigned zerofill option? HELP pls !!
MySQL does not know about PHP datatypes. So an integer or a string in PHP looks the same to MySQL.
It only depends on whether you quote the value in the MySQL query or not.
If you quote a value, it is treated as a string. However, MySQL will automatically convert that to the type of the column.
I don't think you can place 0 in front of a bigint column unless you specify zerofill.
If you have phpmyadmin just play around with the values and storage type of the table to make sure.
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
Offline 1,250 posts
since Sep 2005