Welcome Guest, Not a member yet? Register   Sign In
Inserting NULL values into MySQL from Codeigniter[SOLVED]
#1

[eluser]comex[/eluser]
Hello,
I've tried asking Dr. Google but he seemed unwilling to assist.
I'm not sure if this issue is related to CI or just to my bad understanding of PHP.

What I've been trying to do is to insert the value NULL into INT fields in MySQL(mysqli driver) but I end up with the value 0 inserted instead. I'm using Codeigniters active record class.
The inserted values are coming from variables, I've tried $a = '', $a='NULL' and $a = NULL.
Inserting NULL directly to MySQL works, so the problem seems to be with how PHP interacts with MySQL.

Anyone who has had this problem before?
Thank you!


Messages In This Thread
Inserting NULL values into MySQL from Codeigniter[SOLVED] - by El Forum - 11-27-2009, 11:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB