$sql = "SELECT * FROM reflections WHERE `trusted` = 1 AND `catid` = 1 ORDER BY `id` ASC LIMIT $from, $max_results";
$result = mysql_query($sql) or die('select died: ' . mysql_error());
echo $sql;
echo $result;
while($row = mysql_fetch_array($sql))
{
... some data
}
To this it gives me $sql,$result followed by the warning as shown
SELECT * FROM reflections WHERE `trusted` = 1 AND `catid` = 1 ORDER BY `id` ASC LIMIT 8, 1
Resource id #6
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mysite/public_html/addons/class.upload/pages.php on line 67