Re: Update Query Help...
| From: | 1LT John W. Holmes | Date: | Tue, 10 Dec 2002 19:44:47 +0000 |
| Subject: | Re: Update Query Help... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-24027@lists.php.net to get a copy of this message | ||
> $tmp = $_POST['sbcuid']."-".$_POST['system'][$a];
> $update = "UPDATE accounts SET atime='NOW()' WHERE
> \"id-sys\"='".$tmp."'";
> echo $update;
> $result1 = mysql_query($update, $Prod) or die(mysql_error());
> echo mysql_affected_rows();
Try:
$update = "UPDATE accounts SET atime=NOW() WHERE id-sys='$tmp'";
NOW() is a function, don't enclose it within quotes and make it a string.
You don't put quotes around column names, either, only string values.
---John Holmes...