JOIN Very SLOW...
| From: | Martin E. Koss | Date: | Wed, 28 Nov 2001 10:09:19 +0000 |
| Subject: | JOIN Very SLOW... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14648@lists.php.net to get a copy of this message | ||
The following does work but it extremely slow.
$phselect = "select COUNT(*) AS phTotal from properties LEFT JOIN
propertydetails ON properties.PropertyID=propertydetails.PropertyID where
((propertydetails.Image1Desc='') AND
(properties.PropertyType='$PropertyType'))";
$phresult = mysql_query ($phselect,$conID);
while ($phrow = mysql_fetch_array($phresult)) {
$phTotal = $phrow["phTotal"];
PRINT "<td align=\"right\">$phTotal</td>\n";
} // end WHILE
Is there an obvious problem here and can anyone help?
Martin E. Koss
M: 07946-706459
E: mek@mek.co.uk