title: Why can't I execute this query?
body: <p>I'm running such a simple SQL connection and select but I am getting very odd errors whilst running queries.</p>
  <blockquote>
  <p>Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\Webmaster\run\forum_mc.php on line 23</p>
  <p>Warning: mysqli_query(): Empty query in C:\xampp\htdocs\Webmaster\run\forum_mc.php on line 24
  ()</p>
  </blockquote>
  <pre><code>&lt;?php
      $sqli_host = 'localhost';
      $sqli_dbname = 'forum_handling';
      $sqli_username = 'root';
      $sqli_password = ''; //null as defualt
  
  
  
  $fhconnect = mysqli_connect($sqli_host, $sqli_username, $sqli_password, $sqli_dbname);
  
  if (!$fhconnect) {
      echo &quot;Error: Unable to connect to MySQL.&quot; . PHP_EOL;
      echo &quot;Debugging errno: &quot; . mysqli_connect_errno() . PHP_EOL;
      echo &quot;Debugging error: &quot; . mysqli_connect_error() . PHP_EOL;
      exit;
  }
  
  
      $query = &quot;SELECT Forum Title FROM forum_categories ORDER&quot;;
      $result = mysqli_query($fhconnect, $query);
      
  
      $row = mysqli_fetch_array($result, MYSQLI_NUM);
      $data = mysqli_query($fhconnect,$row); 
      printf (&quot;%s (%s)\n&quot;, $row[0], $row[1]);
  
      mysqli_close($fhconnect);
  </code></pre>