RE: [PHP-DB] Update errors

2003-02-27 Thread Hutchins, Richard
Remove the comma at the end of this line:

  cat_name = '$cat_name',//remove this comma
 -Original Message-
 From: Alawi shekh albaity [mailto:[EMAIL PROTECTED]
 Sent: Saturday, March 01, 2003 1:27 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Update errors
 
 
 What wrong with this SQL
  $SQLSTATEMENT[UPDATE_CAT] = 
  UPDATE  cats SET 
  cat_name = '$cat_name',
  WHERE cat_id = $catidforedit
  ;
  Error no : 1064
 Details : 
  
 You have an error in your SQL syntax near 'WHERE cat_id = 2 ' 
 at line 4
 
 Db : mysql
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Update errors

2003-02-27 Thread Gary . Every
Shouldn't have a comma after cat_name = '$cat_name'  unless you are updating
multiple fields.


Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
Pay It Forward
mailto:[EMAIL PROTECTED]
http://accessingram.com


-Original Message-
From: Alawi shekh albaity [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 01, 2003 12:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Update errors


What wrong with this SQL
 $SQLSTATEMENT[UPDATE_CAT] = 
 UPDATE  cats SET 
 cat_name = '$cat_name',
 WHERE cat_id = $catidforedit
 ;
 Error no : 1064
Details : 
 
You have an error in your SQL syntax near 'WHERE cat_id = 2 ' at line 4

Db : mysql

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Update errors

2003-02-27 Thread Jason Wong
On Saturday 01 March 2003 14:27, Alawi shekh albaity wrote:
 What wrong with this SQL
  $SQLSTATEMENT[UPDATE_CAT] = 
  UPDATE  cats SET
  cat_name = '$cat_name',

Remove that trailing comma.


  WHERE cat_id = $catidforedit
  ;
  Error no : 1064
 Details :

 You have an error in your SQL syntax near 'WHERE cat_id = 2 ' at line 4

 Db : mysql


-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
Massachusetts has the best politicians money can buy.
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php