Guest DJ Phinesse Posted June 30, 2006 Share Posted June 30, 2006 Here is the query:select tbl_voter.songid, tbl_artists.artistName, tbl_songs.songTitle, tbl_songs.songUrl, tbl_labels.labelName, tbl_voter.voteDate, count(*) AS Votes from tbl_voter, tbl_songs, tbl_artists, tbl_labels WHERE tbl_songs.artistID = tbl_artists.artistID AND tbl_songs.songID = tbl_voter.songID AND tbl_artists.labelID = tbl_labels.labelID AND tbl_voter.voteDate >= '2006-05-28' group by songid order by Votes DESC;Any advice appreciated!Charles Quote Link to comment https://forums.phpfreaks.com/topic/13314-help-with-date-query/ Share on other sites More sharing options...
jworisek Posted June 30, 2006 Share Posted June 30, 2006 you know, it is quite helpful if you actually tell us some information. You know, like what it should do and what it is doing wrong... maybe tell us what error you are getting? Quote Link to comment https://forums.phpfreaks.com/topic/13314-help-with-date-query/#findComment-51366 Share on other sites More sharing options...
fenway Posted July 3, 2006 Share Posted July 3, 2006 Other than the fact that JOIN syntax would make that query actually legible, it looks syntactically correct -- which means it's just not doing what you want it to do.. Please clarify. Quote Link to comment https://forums.phpfreaks.com/topic/13314-help-with-date-query/#findComment-52318 Share on other sites More sharing options...
djphinesse Posted July 5, 2006 Share Posted July 5, 2006 Sorry for being so stoopid, guys!Background info: I want a script that will pull out 10 songs with the most votes from dB. I want the voteDate to be a variable in the query so I can change it with PHP. I was just testing it with a date to see if it would work. Quote Link to comment https://forums.phpfreaks.com/topic/13314-help-with-date-query/#findComment-53188 Share on other sites More sharing options...
fenway Posted July 5, 2006 Share Posted July 5, 2006 Still... what's it currently retrieving? Quote Link to comment https://forums.phpfreaks.com/topic/13314-help-with-date-query/#findComment-53605 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.