I am trying to print out the results of a sql query into a table i haven't finished the table yet but im already getting an error please help the error is Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\minterface.php on line 45
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<link rel="stylesheet" type="text/css" href="minterface.css"/>
<head>
<title>Mountbatten School Stock</title>
</head>
<body>
<div id="container">
<div id="header">
<h1>
<img src="logo.gif"/>
</h1>
</div>
<div id="navigation">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
</ul>
</div>
<div id="content-container1">
<div id="content-container2">
<div id="section-navigation">
<ul>
<li><a href="#">Stock</a></li>
</ul>
</div>
<div id="content">
<h2>
Stock Levels
</h2>
<p>
Welcome, to the
</p>
<?php
$connection = mysql_connect("localhost", "root", "");
$database = mysql_select_db("main", $connection);
$school_query = "SELECT * FROM 'part', 'printer', 'tracking' WHERE printer.printerID = part.printerID AND part.partID = tracking.partID AND quantity BETWEEN 0 AND 3 LIMIT 0, 30 ";
$school_result = mysql_query($school_query);
$school_rows = mysql_num_rows($school_result);
?>
<p>
<table border="1" cellspacing="1" cellpadding="6">
<tr>
<th>ProductID</th>
<th>Printer Model</th>
<th>PartID</th>
<th>Manufacturer</th>
<th>PartNo</th>
<th>Cost</th>
<th>Description</th>
<th>Quantity</th>
</tr>
<?php
$i = 0;
while($i < $school_rows)
{
$productID=mysql_result($school_result,$i, "productID");
}
?>
<tr>
<td><?php echo $productID; ?></td>
</tr>
<?php
$i++;
?>
</table>
</p>
<br />
<br />
</div>
<div id="aside">
<h3>
Help
</h3>
<p>
If you have any problems while viewing this page please contact IT support.
</p>
</div>
<div id="footer">
Copyright ©
</div>
</div>
</div>
</div>
</body>
</html>