CodeIgniter Forums
Query WHERE - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Query WHERE (/thread-22206.html)



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.