The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
query code standards
I'm aware that both give me the same result, however with regards to an interger in a WHERE clause, which method is better? Enclosing the int within '2' or without. Is either method faster, or less likely to create problems elsewhere?
PHP Code:
PHP Code:
|
#2
|
||||
|
||||
I've always been told that integers shouldn't be quoted.
|
#3
|
||||
|
||||
Yep, its more efficient to not quote integers as PHP will view them as a string and will thus be forced to do a conversion before searching for it in an int field.
|
#4
|
||||
|
||||
ah, i see - that makes sense, thanks for clarifying it.
Quite often, in native vb code, i have seen something like '" . $vbulletin->userinfo['userid'] . "' so I was confused as to why. Thanks |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|