MySQL UPDATE problem
| From: | Malcolm White | Date: | Thu, 30 Aug 2001 23:06:24 +0000 |
| Subject: | MySQL UPDATE problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-12005@lists.php.net to get a copy of this message | ||
I am having a problem with UPDATE queries with MySQL. Insert, Delete, etc
work fine. I have checked the query statement and it works fine directly
with MySQL just not in a PHP script. An example function is;
function update_gname($gid, $new_name){
$query = "UPDATE Groups SET GName=$new_name WHERE GID=$gid";
$result = mysql_query($query)
or die("error: update_gname()");
return $result;
}
I am using MySQL version 3.22.32 and PHP4.0.3pl1 as a module in Apache1.3.14
with Linux2..2.13.
Thanks,
Malcolm