unable to fetch data from sql : <p>i am trying to make web app for mobile repair management so far i have made it submit data to MySQL but whenever i try to retrieve data either displays blank page or it gives  MySQL_num_rows() expects parameter 1 to be resource error</p>

<p>here is my code</p>

<pre><code>&lt;?php
   $connect = mysqli_connect('localhost','root','password','shopdata');
   if(mysqli_connect_errno($connect)){
echo 'FAILED';
 }
?&gt;

&lt;?php
  $result = mysqli_query($connect,"SELECT * FROM `jobsheets` ");
 ?&gt;

&lt;table width="1350" cellpadding=5 cellspacing=5 border=1&gt;
&lt;tr&gt;
    &lt;th&gt;JOBSHEET NO.&lt;/th&gt;
    &lt;th&gt;CUSTOMER NAME&lt;/th&gt;
    &lt;th&gt;CUSTOMERS PH.&lt;/th&gt;
    &lt;th&gt;MOBILE BRAND&lt;/th&gt;
    &lt;th&gt;MODEL NAME&lt;/th&gt;
    &lt;th&gt;IMEI NO.&lt;/th&gt;
    &lt;th&gt;FAULT&lt;/th&gt;
    &lt;th&gt;BATEERY&lt;/th&gt;
    &lt;th&gt;BACKPANEL&lt;/th&gt;
    &lt;th&gt;CONDITION&lt;/th
&lt;/tr&gt;
&lt;?php
If (mysql_num_rows($result) &gt; 0) {
    while ($row = mysql_fetch_array($result)) {
?&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;?php echo $row['job_number']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row['cust_name']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row['cust_mob']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row['mob_brand']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row['mob_name']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row['imei_number']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row['fault_name']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row['bat_status']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row['panel_status']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row['misc_note']; ?&gt;&lt;/td&gt;
    &lt;/tr&gt;

   &lt;/table&gt;
   &lt;?php
     }
   }
   ?&gt;**strong text**
</code></pre>
