08.10.2017 Views

codeigniter_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CodeIgniter<br />

$this->db->query($sql, array(3, 'live', 'Rick'));<br />

?><br />

In the above example, the question mark(?) will be replaced by the array in the second<br />

parameter of query() function. The main advantage of building query this way is that the<br />

values are automatically escaped which produce safe queries. CodeIgniter engine does it<br />

for you automatically, so you do not have to remember it.<br />

Active Record Class<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!