Jump to content

SQL error


june_c21

Recommended Posts

$query = "SELECT id, month, start_date, end_date, user.name, report.staff_no,details,amount,gl_code,user.bank,user.acc_no,status FROM user,report WHERE report.staff_no = user.staff_no";

$result = mysql_query($query, $dblink);

while($myrow = mysql_fetch_row($result))

{

echo "<tr><td><span class=style2>" . $myrow[0] . "</span</td>";

    echo "<td><span class=style2>" . $myrow[1] . "</span</td>";

    echo "<td><span class=style2>" . $myrow[2] . "</span</td>";

    echo "<td><span class=style2>" . $myrow[3] . "</td></span>";

    echo "<td><span class=style2>" . $myrow[4] . "</span></td>";

    echo "<td><span class=style2>" . $myrow[5] . "</span></td>";

    echo "<td><span class=style2>" . $myrow[6] . "</span></td>";

    echo "<td><span class=style2>" . $myrow[7] . "</span></td>";

echo "<td><span class=style2>" . $myrow[8] . "</span></td>";

echo "<td><span class=style2>" . $myrow[9] . "</span></td>";

echo "<td><span class=style2>" . $myrow[10] . "</span></td>";

echo "<td><span class=style10>" . $myrow[11] . "</span></td>";

Link to comment
https://forums.phpfreaks.com/topic/76931-sql-error/#findComment-389581
Share on other sites

<?
$query = "SELECT id, month, start_date, end_date, user.name, report.staff_no,details,amount,gl_code,user.bank,user.acc_no,status 
	  FROM user,report 
	  WHERE report.staff_no = user.staff_no";
$result = mysql_query($query, $dblink) or die (mysql_error());
print_r(mysql_fetch_assoc($result ));
?>

paste here the output...

Link to comment
https://forums.phpfreaks.com/topic/76931-sql-error/#findComment-389589
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.