09-13-2007, 03:04 PM
|
#9 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,216
Thanks: 17
|
Quote:
Originally Posted by Wildhoney
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.
|
|
|
|