Re: [PHP] ranking product based on votes in a given week

2005-02-22 Thread Ligaya Turmelle
how about a WHERE clause. Maybe something like: $query = "SELECT WEEK(date) as week, count(*) as hits, listingID as lidcount FROM invotestotal WHERE WEEK(date) = 8 ORDER BY hits DESC"; Ryan Schefke wrote: I am trying to echo the ranking of votes (highest to lowest) that a product received in a gi

[PHP] ranking product based on votes in a given week

2005-02-22 Thread Ryan Schefke
I am trying to echo the ranking of votes (highest to lowest) that a product received in a given week. See example of desired output. In the query below, It's working great and outputs ID, votes, and week; however, I can't figure out how to get the ranking for a given week. In the example below