I have a problem with a MySQL query using a LIMIT and my PHP script. I get the following error:
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in D:\wamp\www\multi screen\company.php
Here is my code:
$result=mysql_query("select * from safeway LIMIT $start,$end");
while($o= mysql_fetch_object($result)){
echo '<tr style="background-color:white;">';
echo '<td><input style="width:32;" type="checkbox" name="Edit" value="'.$o->id_pr.'"></td>';
echo '<td >'.$o->id_pr.'</td>';
echo '<td>'.$o->name_prod.'</td>';
echo '<td>'.$o->P_PRICE.'</td>';
echo '<td>'.$o->V_CODE.'</td>';
echo '</tr>';
}
Why am I experiencing this error?