Good Afternoon,
I wonder if someone out there can put me right on this....
Now, I know that the error is caused by the bit after the SELECT, because if I use a simple SELECT * FROM..... it all works fine.
I get the following error;
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Join expression not supported., SQL state S1000 in SQLExecDirect in C:\Apache Group\Apache2\htdocs\test2.php on line 16
The code for the page is;
<HTML>
<HEAD>
<LINK REL="stylesheet" href="main.css" type="text/css">
<TITLE>Test Page</TITLE>
</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0>
<CENTER>
<H1>MDB Link Test Page</H1>
<P>Database output</P>
<CENTER>
<?php
define (NL,"\n");
/ Connecting, selecting database /
$link = odbc_connect("targetscan","sa","","");
$row = odbc_exec($link,"SELECT Consignments.ReceiverCode, Receivers.ReceiverName, Consignments.Prefix, Consignments.WRef, Publishers.PublisherName, Consignments.Invoice, Consignments.Cartons, Consignments.Weight, Consignments.ShipRef, Consignments.PalletNumber, Receivers.Market, Receivers.Zone, Receivers.Remarks FROM Receivers INNER JOIN (Publishers INNER JOIN Consignments ON Publishers.PublisherCode = 'Consignments.PublisherCode') ON Receivers.ReceiverCode = Consignments.ReceiverCode WHERE (((Consignments.ReceiverCode)='$POST[ReceiverCode]') AND ((Consignments.ShipRef) = ''))");
print "DATA FROM SCAN WHERE RECEIVER CODE IS ";
print $POST[ReceiverName];
print "<table width=500 border=1 align=center>";
print "<tr><td>Prefix</td><td>Ref</td><td>Date</td><td>Client</td></tr>";
while(odbc_fetch_row($row))
{
print "<tr>".NL;
$col1=odbc_result($row,1);
$col2=odbc_result($row,2);
$col3=odbc_result($row,3);
$col4=odbc_result($row,4);
print "<td>";
print $col1;
print "</td><td>";
print $col2;
print "</td><td>";
print $col3;
print "</td><td>";
print $col4;
print "</td>".NL;
print "</tr>".NL;
}
print "</table>";
?> </BODY>
</HTML>
Thankns in advance for any help.
Regards,
Neil.