The following query has issues when run from php.
SELECT * from workorder where cid = 18391 and wokey <> 193876 and dateentered > '2004-01-22' order by dateentered desc limit 50
If I use phpmyadmin & execute the query directly, it works fine.
When I run it in php (as follows), it gets into an infinite loop in the browser & eventually FireFox crashes.
$qryw = "SELECT * from workorder where cid = " . $c['cid'] . " and wokey <> " . $woid . " and dateentered > '" . $date10 . "' order by dateentered desc limit 50";
echo "qry = " . $qryw . "<br>";
$resw = mysql_query ($qryw, $Link);
$nw = mysql_fetch_array($resw);
To confirm that the php is right, I copied the query from the echo to run it in phpmysql.
Table structure attached.
There are over 91K rows in the table.
What is the issue?