I can't figure out why Codeigniter inserts 0 in mysql Db even thought that value is true. Let me show you an example
This is My_model where insert happens
function insert($data,$tablename=""){
if($tablename=="")
$tablename = $this->table;
var_dump($data);
$this->db->insert($tablename,$data);
return $this->db->insert_id();
}
This is var dump data
<b>array</b> <i>(size=23)</i>
'name' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'123123'</font> <i>(length=6)</i>
'description' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'123123'</font> <i>(length=6)</i>
'tourist_location' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'true'</font> <i>(length=4)</i>
'approved_location' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'true'</font> <i>(length=4)</i>
</pre>
So where the hell is my code failing? Why if i insert 1 or 'true' the state in db table is 0?
If you need any additional information's, please let me know and i will provide. Thank you for help!