I’m new to scriptcase and new to php so I’m hoping this is something small. But my insert is failing and I can’t seem to figure out why. Any help would be greatly appreciated!
$what = ‘Client Login’;
$when = date(‘Y-m-d H:i:s’);
$sqlins = “insert into client_activity_log (client_id, what, when) values ([user_logged_in], ‘client login’, '”.$when."’)";
sc_exec_sql($sqlins);
This is the error I get:
Error while accessing the database:
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 ‘when) values (4, ‘client login’, ‘2014-04-25 09:53:18’)’ at line 1
Thanks
Ted