title: Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in
body: <p>I know this question looks like repeated, but I really read a lot but doesn't solve the problem.</p>
  
  <p>I want to echo the last 10 rows in sql and I get this error.</p>
  
  <pre><code>Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\rock\fyp\postAdv.php on line 10
  
  THE Event: 
  
  THE Date:
  
  THE Time:
  
  THE Venue:
  
  Note:
  </code></pre>
  
  <p>the php file is </p>
  
  <pre><code>&lt;?php
  $con=mysqli_connect("rock","mido","1234","fyp");
  // Check connection
  if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
   $start = 10;
   $result = mysqli_query($con,"SELECT * FROM event ORDER BY ID DESC LIMIT $start,10");
    $row = mysqli_fetch_array($result) ;
  
   {
  
    echo "&lt;br&gt;&lt;h4&gt; " . "THE Event:  " . $row['EventName'] . "&lt;/br&gt;";
    echo "&lt;h4&gt;" . "THE DATE:  " . $row['Date'] ;
    echo "&lt;h4&gt;" . "THE TIME:  " . $row['Time'] ;
    echo "&lt;h4&gt;" . "THE Venue:  " . $row['Venue'] ;
    echo "&lt;h4&gt;" . "Note:  " . $row['Note'] ;
  
    }
  
  mysqli_close($con);
  ?&gt;
  </code></pre>