View Single Post
Old 09-13-2007, 03:04 PM   #9 (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 Wildhoney View Post
Are you sure about that Village Idiot? I'm fairly sure if the (int) typecasting is unable to wither the string down to an integer, it will leave you with zero (0). In addition to Jordie's comment, which is spot on, you may also use sprintf as well. Like so:

PHP Code:
$szSQL sprintf("update ... where id=%d"$id); 

It returns zero rows because PHP doesn't look if its an int or a varcher (ect) that it is looking for, not does SQL.
Village Idiot is offline  
Reply With Quote