Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest DJ Phinesse

Help with date query!

Recommended Posts

Guest DJ Phinesse
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Still... what's it currently retrieving?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.