|
D
drk2009 author
Hello,
Can anyone please help me fix my code, I am getting a systax error on my code and I can't find what is wrong with it.
//********** Save old data record in another table ************
global $conn,$strTableName; $strSQLSave = "INSERT INTO condition_archive (`ID`,
`Name`, `Date_Entered`, `Date_modified`, `Created_by`, `Description`, `Description1`,
`Description2`, `Description3`, `Assign_to`, `Compliant`, `Action_required`) SELECT `ID`,
`Name`, `Date_Entered`, `Date_modified`, `Created_by`, `Description`, `Description1`,
`Description2`, `Description3`, `Assign_to`, `Compliant`, `Action_required`
FROM ".$strTableName." where ".$where;
db_exec($strSQLSave,$conn); return true; I am getting the following error:
Technical information Error type 256 Error description You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition where ID=1' at line 6 URL localhost/phprunner/condition_edit.php? Error file C:\wamp\www\phprunner\include\dbconnection.php Error line 36 SQL query INSERT INTO condition_archive ( ID, Name, Date_Entered, Date_modified, Created_by, Description, Description1, Description2, Description3, Assign_to, Compliant, Action_required) SELECT ID, Name, Date_Entered, Date_modified, Created_by, Description, Description1, Description2, Description3, Assign_to, Compliant, Action_required FROM condition where ID=1 Any help will be appreciated. Sincerely,
Derek P
|
|
|