The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Query: & && or AND Help
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 |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|