CodeIgniter Forums
Query WHERE - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Query WHERE (/showthread.php?tid=22206)



Query WHERE - El Forum - 09-01-2009

[eluser]georgerobbo[/eluser]
Code:
$query = $this->db->query('SELECT Object_Value FROM heal_sub_content', 'WHERE Object_ID = contact');
        return $query->result_array();

WHERE statement doesn't appear to be working? Is there an alternative method?


Query WHERE - El Forum - 09-01-2009

[eluser]Dam1an[/eluser]
If you're using the query method, the SQL should all be a single string, with the optional second paramters an array used for query binding


Query WHERE - El Forum - 09-01-2009

[eluser]georgerobbo[/eluser]
Ah excellent. Thank you very much.