edgarperez
04-16-2005, 11:29 AM
I am trying to get a short list of drivers who have won more than one race in my winners database and cannot get rid of the one time winners.
Here is what I have written
SELECT winner, count(winner) as total FROM allchallenges where winner not in ('PP', 'Called after 1 round (rain)', 'Postponed%') and attendance > 0 group by winner order by total desc"
this gives me a list with every driver in my database
when I change it to this
SELECT winner, count(winner) as total FROM allchallenges where winner not in ('PP', 'Called after 1 round (rain)', 'Postponed%') and attendance > 0 and total >1 group by winner order by total desc"
I get this errorWarning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/corvett1/public_html/national/winnercount.php on line 7
How can I fix this?
Here is what I have written
SELECT winner, count(winner) as total FROM allchallenges where winner not in ('PP', 'Called after 1 round (rain)', 'Postponed%') and attendance > 0 group by winner order by total desc"
this gives me a list with every driver in my database
when I change it to this
SELECT winner, count(winner) as total FROM allchallenges where winner not in ('PP', 'Called after 1 round (rain)', 'Postponed%') and attendance > 0 and total >1 group by winner order by total desc"
I get this errorWarning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/corvett1/public_html/national/winnercount.php on line 7
How can I fix this?