Erro com select e INNER JOIN
Olah todo mundo, tudo bem com vcs?Bom, toh precisando de uma ajuda no codigo abaixo<head><title>Estoque</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><script language="JavaScript" type="text/JavaScript"><!--function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);//--></script></head> <body bgcolor="#FFFFFF"> <table width="28%" border="1" cellspacing="1" cellpadding="1" bgcolor="#FFFFFF"> <tr bgcolor="#CCFFFF"> <td width="33%" height="22"><div align="center"><b>Material</b></div></td> <td width="36%" height="22"><div align="center"><b>Localização</b></div></td> <td width="31%" height="22"><div align="center"><b>Qtd Saldo </b></div></td> <td width="31%"><div align="center"><strong>Descr</strong></div></td> <td width="31%"><div align="center"><strong>Refer</strong></div></td> </tr> <?php //connect to the database $connectionstring = odbc_connect("Regency", "", ""); $id1 = $_POST["codfameq"]; //SQL query $Query = "SELECT BRET4002.Mat,BRET4002.Localiz,BRET4002.Qtd_Saldo,PARAM006.Juncao,PARAM006.Descr,PARAM006.Refer from (BRET4002 INNER JOIN PARAM006 ON BRET4002.Localiz = PARAM006.Juncao) WHERE BRET4002.Mat = '$id1' "; //execute query $queryexe = odbc_do($connectionstring, $Query); //query database while(odbc_fetch_row($queryexe)) { //collect results $BRET4002.Mat = odbc_result($queryexe, 1); $BRET4002.Localiz = odbc_result($queryexe, 2); $BRET4002.Qtd_Saldo = odbc_result($queryexe, 3); $PARAM006.Descr = odbc_result($queryexe, 4); $PARAM006.Refer = odbc_result($queryexe, 5); //format and display results print ("<tr>"); print ("<td>$BRET4002.Mat</td>"); print ("<td>$BRET4002.Localiz</td>"); print ("<td>$BRET4002.Qtd_Saldo</td>"); print ("<td>$PARAM006.Descr</td>"); print ("<td>$PARAM006.Refer</td>"); print ("</tr>"); } //disconnect from database odbc_close($connectionstring); ?></table></body> </html> Alguem sabe o que pode ser êsse erro?Está dando Parse error: parse error in c:\easyphp1-8\www\teste1.php on line 44ObrigadoDiscussão (6)
Carregando comentários...