![]() |
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:
|
I've always been told that integers shouldn't be quoted.
|
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.
|
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 |
All times are GMT. The time now is 01:11 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|