I am using Ubuntu + php + unixodbc + mdbtools to work with a .mdb file.
Every thing (connection + choice) works well, but insert or update.
My code looks something like this:
$mdbConnection = new \PDO("odbc:mdbdriver",$user , $password , array('dbname' =>$FileName) ); $SelectResult = $mdbConnection->query("Select * from Zone"); $UpdateResult = $mdbConnection->query("Update Zone Set ShahrCode = 99");
$SelectResult returns the correct result, and the second causes an error causing an apache error for segfault.
I am testing it with the isql.Running Select command successfully, but Update is not.
#isql mdbdriver +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>Update Zone Set ShahrCode = 99 Error at Line : syntax error near Update syntax error near Update Got no result for 'Update Zone Set ShahrCode = 99' command [08001][unixODBC]Couldn't parse SQL [ISQL]ERROR: Could not SQLExecute
Or
SQL> Update [Zone] Set ShahrCode = 99 Error at Line : syntax error near Update syntax error near Update Got no result for 'Update [Zone] Set ShahrCode = 99' command [ISQL]ERROR: Could not SQLExecute
How do I fix this error? Thank you all
source share