I am having difficulty with a MySQL query in PHP. I am getting the following error when executed: Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\xampp2\htdocs\htdocs\Speedtest\executimpcsv.php on line 22

Full Code:

PHP Code:
<?php session_start();error_reporting(E_ALL); ini_set'display_errors','1');if(isset($_GET['compname'])) {      $compname $_GET['compname'];  }  else {  echo Error;    }  $_SESSION['compname']= $compname;echo "<br>";echo $compname;

$dbConnection mysqli_connect('****''****''****''speedtest');
$query  "SELECT 'ExpectedRig' FROM 'rigcomputers' WHERE 'ComputerName' = '$compname'";$result mysqli_query($dbConnection$query);
if (
mysqli_num_rows($result) > 0) {
    while (
$row mysqli_fetch_array($resultMYSQLI_ASSOC)) {
} else {
"Query didn't return any result";


I would like to store the result of the query in a Session variable to carry to another page. However, I can't get this query to give me a result. I have confirmed that the table has an entry that matches the variable for $ComputerName.

I have tried various methods of writing this query, but it appears I am stuck. Thank you in advance for your help.