Hi all,
Having played with MySQL and Access connections for ages I have now got to connect to a MSSQL.
I am getting an error message as follows, but can't find any info on it.....
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '1234'., SQL state 37000 in SQLExecDirect in C:\Program Files\Apache Group\Apache2\htdocs\fm3\booksellerawaitingmoreinfo.php on line 48
and here is my connecty bit and query.......
/* Connecting, selecting database */
$link = odbc_connect("fm3","sa","","") or die("Could not select database");
$row = odbc_exec($link,"SELECT Consignments.ReceiverCode, Consignments.Prefix, Consignments.WRef, Consignments.DateReceived, Publishers.PublisherName, Consignments.Invoice, Consignments.Cartons, Consignments.Weight, Consignments.ShipRef, Consignments.Terms, Consignments.Value, Consignments.CurrencyCode, Consignments.Comments, Consignments.OrderRef, Consignments.Copies FROM Consignments INNER JOIN Publishers ON Publishers.PublisherCode = Consignments.PublisherCode WHERE (((Consignments.Prefix)='$warehouseprefix') AND ((Consignments.WRef)='$warehouseref'))");
Any offers would be appreciated.
Cheers,
Neil.