Code: Select all
<?php
$sqlCommand = "INSERT INTO MachineServiceProfiles (MachineServiceProfileID, Model, SerialNumber, DateMade, DateShipped, WarantyExpireDate, LocationID, CompanyID) VALUES ($machineID, '$machineName', '$serialNum', 'Format(#$dateM#, 'Short Date')', Format(#$dateS#, 'Short Date'), Format(#$dateW#, 'Short Date'), $locationID, $companyID)";
?>"Syntax error (missing operator) in query expression ''Format(#06/25/2003#, 'Short Date')''., SQL state 37000 in SQLExecDirect"
The weird thing about it is that 'Format(#06/25/2003#, 'Short Date')' works perfectly fine somewhere else in the same file, on the same table.
the only difference is that in the other place where it works i'm only change data, and here i'm adding a new row of data.
any ideas as to what the missing operator is?
thanks