Hello,
"SELECT online FROM characters WHERE online='1' AND race='1' OR race='3' OR race='4' OR race='7' OR race='11'";
Nein, das ist leider nicht die adäquate Umsetzung. Operatoren haben eine Rangfolge, in Punkto Logik lautet diese zumeist NOT-AND-OR, d.h. ein AND bindet stärker als ein OR. Dein Statement lautet als gerade WHERE (online=1 AND race=1) OR race=3 OR race=4 OR race=7 OR race=11. Wenn du die Priorität ändern willst verwende Klammern
WHERE online=1 AND (...)
Aber dies geht auch nicht
hast du Martins Hinweis in Punkto Fehlerbehandlung (siehe z.B. mysql_error beachtet? Hast du das Statement mal mit PHPMyAdmin oder anderweitig direkt gegen die Datenbank geschickt?
MfG
Rouven
--
-------------------
sh:| fo:} ch:? rl:( br:& n4:{ ie:| mo:} va:) js:| de:] zu:| fl:( ss:) ls:& (SelfCode)
He is entertaining both out of the car and in the car because if you tell him that a corner is almost flat then he is the guy who is going to try to take it flat even if it means shunting it the other side of it, he will come with the data and say 'hey, I may have crashed and destroyed the car, but I was flat-out'. That is an interesting quality that he has! -- Team Member on Jacques Villeneuve
-------------------
sh:| fo:} ch:? rl:( br:& n4:{ ie:| mo:} va:) js:| de:] zu:| fl:( ss:) ls:& (SelfCode)
He is entertaining both out of the car and in the car because if you tell him that a corner is almost flat then he is the guy who is going to try to take it flat even if it means shunting it the other side of it, he will come with the data and say 'hey, I may have crashed and destroyed the car, but I was flat-out'. That is an interesting quality that he has! -- Team Member on Jacques Villeneuve