View Single Post
Old 05-01-2008, 10:18 PM   #14 (permalink)
Village Idiot
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by wGEric View Post
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.
__________________

Village Idiot is offline  
Reply With Quote