That is MySQL, not PHP doing that to you. You need to set your SQL_MODE to strict to get that kind of behavior.. there are other implications to this mode so you should review:
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html - michael On 8/8/07, Mahmoud Badreddine <[EMAIL PROTECTED]> wrote: > Hello > I have a table which contain a few numerical values. > I set the default values to be NULL. > When I insert values using phpMyAdmin, it sets the values to NULL correctly. > But when I insert using a PHP script that I wrote it sets the values > to 0.00or 0. > In my script I do test if the values are empty and in case they are I set > the variable to NULL. But that still doesn't help. > Is that a mysql problem ? > Thank you. > > -- > -Mahmoud Badreddine > > http://www.spreadfirefox.com/ > -- - michael dykman - [EMAIL PROTECTED] - All models are wrong. Some models are useful. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]