11-12-2009, 02:53 PM
|
#24 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
In order for you to become a better PHP developer you need to actually understand what is going wrong, like the post above suggests myself or someone else doing it for you won't help you in the long run.
We must start by logically looking at the problem.
1. PHP isnt complaining anymore, so PHP syntax error isnt at fault and our program flow doesnt look to be at fault
2. MYSQL doesn't seem to find a problem with the syntax of our SQL, otherwise mysql_query would have returned false and thus mysql_error() would have been fired.
so we must now think about the data passed into the SQL, is that where the problem is? does the id you are testing against in the WHERE clause actually exist in the db?
Clue: mysql_affected_rows();
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|