I keep getting this error for updating a table with another table:
You have an error in your SQL syntax near 'SELECT givenname FROM ldap_ad WHERE samaccountname = Requestor), sn = ' at line 2
Here is the sql query:
mysql_query(
"UPDATE results SET
givenname = (SELECT givenname FROM ldap_ad WHERE samaccountname = Requestor),
sn = (SELECT sn FROM ldap_ad WHERE samaccountname = Requestor)
"
)
or die(mysql_error()); [/COLOR]
The update query works on Windows a OS, but I get this error on a Linux OS.
-any ideas why?
thanks!