I've got an event setup "After Record Update" with the following code, however I keep getting an error.
[codebox]global $conn;
$strUpdate = "
UPDATE readers
SET readers.ContractsID =
(SELECT contracts.ContractsID
FROM contracts
WHERE contracts.Company = `".$values["Company"]."`)";
db_exec($strUpdate,$conn);[/codebox]
The error I get is:
Error type 256
Error description Unknown column '' in 'where clause'
URL s7eweb01/lenel/readers_edit.php?
Error file C:\Inetpub\wwwroot\Lenel\include\dbconnection.php
Error line 34
SQL query UPDATE readers SET readers.ContractsID = (SELECT contracts.ContractsID FROM contracts WHERE contracts.Company = ``)
Can anyone offer some insight?