05-01-2008, 10:18 PM
|
#14 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
|
Quote:
Originally Posted by wGEric
Since it is an integer, cast it as one. Don't try to use it as a string.
PHP Code:
$id = intval("99999 OR id > 0");
Problem solved.
|
Typecasting takes longer. There is no downside to putting quotes around the value in the query. Typecasting also does not take care of string values, which you will have to use quotes with. Typecasting will do the job, but it leaves a greater possibility of forgetting to do it. If you just type everything in with a quote, there is a far less chance of forgetting.
|
|
|
|