The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
PHP Code:
|
|
#2
|
||||
|
||||
|
PHP Code:
But then your query logic seems odd. |
|
#3
|
||||
|
||||
|
For the standings, I don't want it to display people who havn't played any games, or there would be an extra thousand people in there inbetween the good/middle and the lower scored players.
|
|
#4
|
||||
|
||||
|
Quote:
|
|
#5
|
||||
|
||||
|
Quote:
Personally, I would use this ; [sql]DB_site->query("SELECT * FROM user WHERE wins>0 OR losses>0 ORDER BY rating DESC");[/sql] |
|
#6
|
|||
|
|||
|
He's right, I got lost in that logic too. It's OR.
|
|
#7
|
|||
|
|||
|
& is bitwise "and" in most languages. For clarity in both PHP and SQL, I use the keyword "and" (and "or").
|
|
#8
|
||||
|
||||
|
Quote:
.
|
|
#9
|
||||
|
||||
|
i also use AND/OR in C++ as i defined makros there, so the & is just used for bitwise operations.
it's much easier to read the code quickly then
|
![]() |
|
|