Re: Update Query?
| From: | Dobromir Velev | Date: | Tue, 02 Oct 2001 09:21:29 +0000 |
| Subject: | Re: Update Query? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-12908@lists.php.net to get a copy of this message | ||
Hi,
The query code seems fine to me - did you try to otput $query to see if all
the variables you are using are OK. May be $order,$stationid or $orderNewsID
is misspeled or is not set properly.
HTH
Dobromir
-----Original Message-----
From: Jay Paulson <jpaulson@lbjs.com>
To: php-db@lists.php.net <php-db@lists.php.net>
Date: Tuesday, October 02, 2001 2:22 AM
Subject: [PHP-DB] Update Query?
>Hello-
>I'm trying to run an update query in an application I'm making. I keep
>getting a MySQL error however when I try and print out the mysql_error()
>nothing is returned. I run the same query in phpMyAdmin and the query runs
>fine. Below is the update query I'm running and the php code that I'm
using
>to build it. Any suggestions?
>
>update news set newsOrder=2 where station_id=5 and id=3
>
>$query = "update news set newsOrder=".$order." where station_id=$stationid
>and id=".$orderNewsID;
>
>thanks,
>jay
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
>For additional commands, e-mail: php-db-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>