Forum Moderators: coopster

Message Too Old, No Replies

How to pass a NULL Value in PHP/MySQL

         

MayPh

2:23 pm on Mar 12, 2007 (gmt 0)



Can someone please help me on how can I pass a NULL Value in PHP/MySQL, cause everytime I pass a blank data field, it saved as 1 character space on the MySQL table.

Sekka

2:34 pm on Mar 12, 2007 (gmt 0)

10+ Year Member



If you want to store NULL in MySQL, make sure the field in the MySQL DB can take a NULL value, and if it can, use,

myfield = NULL

Notice no quote marks.

Hope this helps.