[PHP] Re: [PHP-DB] Re: [PHP] need help looping through each record with a query -stumped

2002-01-10 Thread DL Neil
Brian, > first off, Martin your suggestion looks great but I don't think its SQL > syntax is supported by MySQL. It's a good start though - gives me something > to work with :) =until it is tried, you won't know! From an SQL point of view it looks ok. In fairness to Martin, from the 'further in

Re: [PHP] need help looping through each record with a query -stumped

2002-01-09 Thread Brian Tully
thanks guys, I really appreciate it. first off, Martin your suggestion looks great but I don't think its SQL syntax is supported by MySQL. It's a good start though - gives me something to work with :) I guess I need to clarify a bit more about what needs to happen... in the MySQL database, ther

RE: [PHP] need help looping through each record with a query - stumped

2002-01-09 Thread Martin Towell
could you change this $query2 = ("SELECT Month, Score FROM scores WHERE Username = '$Username'"); to $query2 = ("SELECT count(*) FROM scores WHERE Username = '$Username' and Score >= 75 and Month in ('January', 'December', 'November', 'October')"); $result2 = mysql_query($query2) or

Re: [PHP] need help looping through each record with a query - stumped

2002-01-09 Thread Mehmet Kamil ERISEN
Hi, If I am not missing anything, you are not sorting SELECT Month, Score FROM scores WHERE Username = '$Username' Also, the requirement is not three consecutive test in a month, so I would not break the loop into months. once you have it ordered it by the date : while (list($Month, $Score