solidcodes — 2012-03-09T02:12:12-05:00 — #1
Hi guys I have query codes below,
$offering = 'test';
$query = $this->db->query("SELECT * FROM swap WHERE offering = $offering");
if ($query->num_rows() > 0)
$row = $query->row();
$swapid = $row->swap_id;
Is my SELECT codes correct?
Please correct me if I'm wrong.
Thanks in advanced.
guido2004 — 2012-03-09T02:41:18-05:00 — #2
No. $offering contains a string, so you should put quotes around it.
mittineague — 2014-09-23T21:27:29-04:00 — #3
This topic is now archived. It is frozen and cannot be changed in any way.