I want to prevent injection on my codeigniter script. I used Query Binding array, but It's not fetching out the result... I get this error
Fatal error: Call to a member function result() on a non-object in C:\xampp\htdocs
code bellow
<php
$my = "Select * from gw_marge where amount != ? AND is_activated= ? ORDER BY RAND()";
$this->db->query($my, array(0, 1));
foreach ($my->result() as $roww)
{
$pay = $roww->amount;
$idd = $roww->id;
}
?>
<p><?php echo $pay.' &'.$idd; ?></p>
Where did i get it wrong.