Re: Update Query Help...
| From: | DL Neil | Date: | Tue, 10 Dec 2002 19:45:58 +0000 |
| Subject: | Re: Update Query Help... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-24029@lists.php.net to get a copy of this message | ||
SCOTT,
> I am attempting to UPDATE a table and I have having absolutely ZERO
> success. Here is the query:
> $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();
> Please help me figure out why this is not working. I have tried
> quoting the column name 'id-sys' every way I can think of, but nothing
> works. The column is initially NULL, and I am attempting to update just
the
> single column with a timestamp. Thanks in advance.
NOW() is a function and should not be part of a quoted string.
=dn