[thelist] Incorrect SQL?

Lachlan Cannon luminosity at members.evolt.org
Fri Apr 5 23:35:01 CST 2002


Hey, I've been trying to put together this weblog of mine, and to test out
the first stages I've put some test data into the db. However, it appears as
if no results are being returned from my mysql_query. I got the SQL for it
from Rudy, but have modified it a bit, and I think I might have broken it so
that it's not returning anything. Can anyone see what's wrong with it?

$sql = "SELECT entryTitle, DATE_FORMAT(entryDate,'%d-%m-$Y') as entryDate,
DATE_FORMAT(entryDate,'%W, %M %D') as entryLongDate,
DATE_FORMAT(entryDate,'%T') as entryTime, entryEntry, count(*) as
entryComments FROM blogEntries, blogComments WHERE blogEntries.entryId =
blogComments.entryId GROUP BY entryTitle, entryDate, entryEntry ORDER BY
entryDate DESC LIMIT 7";

Thanks

Lach





More information about the thelist mailing list