Re: mysql update query
| From: | Richard Creech - DreamRiver.com | Date: | Wed, 05 Dec 2001 16:58:36 +0000 |
| Subject: | Re: mysql update query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-76748@lists.php.net to get a copy of this message | ||
Greg,
You must specify the tablename :)
Like this:
UPDATE myTableName ...
or
mysql> UPDATE persondata SET age=age+1;
For the official syntax visit mysql language reference at http://www.mysql.com at
http://www.mysql.com/doc/U/P/UPDATE.html
Kind Regards,
Richard Creech
richardc@dreamriver.com
250.744.3350 Pacific Time Canada
Dreamriver Software Powers the Net
http://www.dreamriver.com
You wrote:
From: "Greg Sidelinger" <gate@psu.edu>
To: <php-general@lists.php.net>
Date: Tue, 4 Dec 2001 22:27:20 -0500
Message-ID: <000d01c17d3c$c0a393e0$1000a8c0@asylum>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000E_01C17D12.D7CD8BE0"
Subject: mysql update query
I'm having trouble getting an update query to work
Here is what I'm doing
$result = mysql_query("update table set value1='$value1',
value2='$value2' where id='$id'");
It is not updating the database. All the $vars have values and I'm
using the correct columns names. Could someone please point me in the
correct direction because I have been trying different things for a
while but can't seem to get it to work.
Greg