MySQL Query works in phpMyAdmin but not in php script
<p>I have a query that I have run in phpMyAdmin and it returns results but if I cut and paste the query into a php script on a webpage the query seems to run but nothing is shown on the page. It also doesn't finish loading the page. The page ends where my query starts. Is it possible that the execute time for a web based query takes too long versus a query run through phpMyAdmin?  Here is the query:</p>

<pre><code>$query = "SELECT DISTINCT tblCertificates.WebReportedDt, tblInsHeader.name1, tblInsHeader.name2, tblQuotes.certnum, tblQBalloons.regnum
FROM ((`tblQuotes`
INNER JOIN `tblInsHeader` ON tblQuotes.insuredid = tblInsHeader.insuredid)
INNER JOIN `tblQBalloons` ON tblQuotes.quoteid = tblQBalloons.quoteid)
INNER JOIN `tblCertificates` ON tblQuotes.quoteid = tblCertificates.QuoteID
WHERE (((tblCertificates.WebReportedDt) IS NOT NULL)AND ((tblCertificates.web) = True) AND tblCertificates.WebReportedDt &gt;= '".$MyDate."')
ORDER BY tblCertificates.WebReportedDt DESC , tblInsHeader.name1, tblQuotes.certnum, tblQBalloons.regnum";
$results = mysql_query($query) or die("Query Timed out");
  while ($r = mysql_fetch_array($results)) {
extract ($r);
 echo $WebReportedDt." - ".$name1." ".$name2." - ".$certnum." - ".$regnum."&lt;br&gt;";
}
</code></pre>

<p>The MyDate var is the current date (YYYY-mm-dd HH:ii:ss) in DATETIME format.</p>

<p>Any ideas would be helpful.</p>

<p>Thanks!</p>
