Welcome Guest, Not a member yet? Register   Sign In
active record where field IS NULL error?
#4

[eluser]Armchair Samurai[/eluser]
Two things: first, you haven't specified the table you're running the query on. Secondly, you need to set the third parameter to FALSE, not TRUE, if you want to avoid CI escaping the clause.

Code:
$this->db->where('name', $this->input->post('name'));
$this->db->where('section IS NULL', NULL, FALSE); // third param set to FALSE

$ilan = $this->db->count_all_results('tblprof'); // include table name, or use from()


Messages In This Thread
active record where field IS NULL error? - by El Forum - 02-28-2010, 03:13 AM
active record where field IS NULL error? - by El Forum - 02-28-2010, 06:47 AM
active record where field IS NULL error? - by El Forum - 02-28-2010, 08:51 AM
active record where field IS NULL error? - by El Forum - 02-28-2010, 09:48 AM
active record where field IS NULL error? - by El Forum - 02-28-2010, 06:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB