Re: mysql update help needed
| From: | Miguel Cruz | Date: | Wed, 20 Mar 2002 20:17:32 +0000 |
| Subject: | Re: mysql update help needed | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89397@lists.php.net to get a copy of this message | ||
On Wed, 20 Mar 2002, ROBERT MCPEAK wrote:
> $sql = "UPDATE mytable SET
> img_url=$img_url,visitdate=$visitdate,img_group=$img_group,display=$display,
> caption=$caption where id = $id";
You need to surround non-numeric values with 'single quotes'.
$sql = "update mytable set img_url='$img_url',
etc.
miguel