RE: [PHP] hrm...sql problem
| From: | Juri Smarschevski | Date: | Mon, 30 Oct 2000 09:17:20 +0000 |
| Subject: | RE: [PHP] hrm...sql problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22632@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Kurth Bemis [mailto:kurth@usaexpress.net]
>
> why won't this update code work?
>
> $sql = "UPDATE members SET
> passwd='$password',zip='$zip',public=1 WHERE
> username='$username'";
>
Try instead this:
$sql = sprintf("UPDATE members SET passwd='%s',
zip='%s',public=1 WHERE username='%s' ",
(string)$password, (string)$zip, (string)$username );
Regards,
Juri