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

[eluser]jedd[/eluser]
[quote author="comex" date="1259365383"]
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.
[/quote]

mysqli? {raises eyebrow}

Show us the CI AR code that you're using - it's much easier for us to work out what's going on when we see what's going on.

Quote:Inserting NULL directly to MySQL works, so the problem seems to be with how PHP interacts with MySQL.

Code?

Schema, as suggested, would be handy - you can tell straight away from a DESCRIBE tablename; whether NULL is allowed in that column.


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



Theme © iAndrew 2016 - Forum software by © MyBB