title: Problem with 'mysql_fetch_array() supplied argument is not a valid MySQL result resource'
body: <p>I have a database with a table which includes among others, one column of dates (the column is titled 'date') in the format of Y-m-d.</p>
  
  <p>I want to extract all the rows of data which have been logged during the current month, so I am using the following query:</p>
  
  <pre><code>$year_month = date("Y-m");
  $query = "SELECT date FROM tracker WHERE date LIKE '$year_month%'";
  </code></pre>
  
  <p>When I execute the query and attempt to output it visually, I get the error "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource on line 64".</p>
  
  <p>Line 64 is the beginning of the following loop:</p>
  
  <pre><code>while($row = mysql_fetch_array($result, MYSQL_ASSOC)
  {
      echo "Name :{$row['date']} &lt;br&gt;";
  }
  </code></pre>
  
  <p>I've scoured google and had a look here too, but I can't seem to figure out this seemingly simple problem. As far as I can tell, the actual query is executing just fine.</p>
  
  <p>Any ideas?</p>
  
  <p>** Additional - Call to MySQL Query Below **</p>
  
  <pre><code>$result = mysqli_query($conn, $query);
  </code></pre>
  
  <p>$conn refers to the following line:</p>
  
  <pre><code>$conn = @mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die ('Error connecting to MySQL');
  </code></pre>