PHP runner v4.0
PHP version 4.4.7
I've set up a test db for creating audit records.
table : id, item, desc
table_log : id, item, desc
On the table - on edit page, I've tried every event,
onload - Save old data record in another table
before record update - insert a record into another table
and I always get a similar error message...it's telling me it's a syntax error, but I can't figure out how to fix it. Using php 4.4.7
----
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 'desc) SELECT item, desc FROM table where `table`.`id`=8' at line 1
URL www.air-crane.ca/testbed2/table_edit.php?editid1=8
Error file /home/airhypen/public_html/testbed2/include/dbconnection.php
Error line 26
SQL query select `id`, `item`, `desc` From `table` where `table`.`id`=8
Solution
This is a general error. It occurs when thereis an error in event code or in SQL.
Send your SQL or event code along with full error message tosupport@xlinesoft.com.
----
Here's the event code...
global $where;
// Parameters:
// $where - string with WHERE clause pointing to record to be edited
//** Save old data record in another table ****
global $conn,$strTableName;
$strSQLSave = "INSERT INTO table_log (item, desc) SELECT item, desc FROM ".$strTableName." where ".$where;
db_exec($strSQLSave,$conn);
Any help would be greatly appreciate