I just realized that the order in where clauses matters. Or at least seems to. These two sql statements does not retrieve the same result:
PHP Code:SELECT count(*) AS new FROM comments, user2album, album WHERE album.user_id = '2' AND comments.album_id = album.album_id AND comments.comment_date > '2004-11-28 12:06:06' AND user2album.user_id = '1'
Why?PHP Code:SELECT count(*) AS new FROM comments, user2album, album WHERE album.user_id = '1' AND comments.album_id = album.album_id AND user2album.user_id = '2' AND comments.comment_date > '2004-11-28 12:06:06'








Bookmarks