I made my scripts without class. (framework). Now I have changed my mind & I wanna make my scripts with classes. I like it. But there I have a problem.. Infinite Loop While. I didn't take this problem before with without classes..
While Rule;
while ($fetch=$db->fetchObject($db->q("SELECT * FROM auction_house.items ORDER BY id DESC LIMIT ".$min_stuff.",".$max_stuff."")))
{
// etc
}
Class;
public function fetchObject($queryRes)
{
$this->queryRes = $queryRes;
$this->record = mysql_fetch_object($this->queryRes);
return $this->record;
}
When I try to while loop, I am taking infinite loop on page. How can I solve this problem?
You executing query in each iteration. It always returns a new resource.
Try to separate query and cycle: