Ok - has anyone ever had this happen before?
I have a SQL Insert statement. When I build the SQL and execute it in PHP I
get the following error:
Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft
JET Database Engine Description: Syntax error in INSERT INTO statement. in
c:\phpweb\commit.php on line 81
So then I echo the SQL statement and this is what it looks like:
INSERT INTO
Cards(active,division,province,filetitle,air,water ,sewage,pttw,partVIII,part
46) VALUES ('1','ob','Ontario','0 0 0 0','0','0','0','0','0','0')
Everything is formatted correctly - column names format ect.
So then I take the echo'd sql and copy it into the PHP code as the sql
statement. When I re-run the SQL code with static sql statement it inserts
the record!!!!!
So basically if I build the SQL dynamically it won't execute. But if I echo
the dynamic sql then copy it into a sql variable it executes!
This is driving me nuts....please help!
Thanks,
Matt