Hello,
I'm trying to generate a SELECT query when certain conditions are met using $i:
for ($i = 1; $i < 25; $i++)
{
if (($id % $i) == 0)
{
$this->database->findWhere(array('id' => $i));
}
}
if I die(print($i)) before the database call, $i prints correctly. However, the query always shows $i as 1. I can't find a bug in my database class, but I figured before I tore it apart I'd see if anybody saw a problem with $i here.
Thanks!