Re: Update statement sent by PHP to MySQL
| From: | Johannes Janson | Date: | Fri, 11 May 2001 18:02:47 +0000 |
| Subject: | Re: Update statement sent by PHP to MySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52494@lists.php.net to get a copy of this message | ||
Hi,
> update $T1 set caption = $caption where name = $name
put single quotes aroud the variables: caption='$caption'.
You can do this aswell:
$result = mysql_query("UPDATE $T1 SET caption='$caption WHERE
name='$name'",
$DB)
or die(mysql_error());
if (! $result) {
send the haeder...
}
hope it helps
Johannes