title: Mysql query failed but I'm not getting specific error
body: <p>Something really weird is going on here. I have this method for mysqli query.</p>
  
  <pre><code>    public function select($options) {
      $default = array (
          'table' =&gt; '',
          'fields' =&gt; '*',
          'condition' =&gt; '2',
          'order' =&gt; '1',
          'limit' =&gt; 50
      );
      $options = array_merge($default,$options);
      $query = "SELECT {$options['fields']} FROM {$options['table']} WHERE {$options['condition']} ORDER BY {$options['order']} LIMIT {$options['limit']}";
      if ($result = $this-&gt;conn-&gt;query($query)) {
          while ($row = $result-&gt;fetch_assoc()) {
              $rows[] = $row;
          }
          return $rows;
      } else {
          printf("Query failed: %s\n", $mysqli-&gt;error);
          exit;
      }
  }
  </code></pre>
  
  <p>Once the query get executed I get $rows and everything works like a charm. But then when I try to get specific key in array I get the "Query failed:" without specific message :S</p>
  
  <pre><code>$options = array(
          'table' =&gt; 'settings',
          'fields' =&gt; 'setting_wall_post,setting_status_tag,setting_photo,setting_like,setting_comment',
          'limit' =&gt; '1',
          'condition' =&gt; "setting_id = 6",
      );
      $check = $this-&gt;mysql-&gt;select($options);    
      print_r($check);
      $check = $check[0];
  
      if($check["setting_wall_post"]) //if I comment out this IF block it works :(
          $this-&gt;scope["wall_post"] = "publish_stream";
  </code></pre>
  
  <p>Also I've tried to close mysqli connection and then I get </p>
  
  <pre><code>Warning: mysqli::query() [mysqli.query]: Couldn't fetch mysqli
  </code></pre>
  
  <p>this IF block is acting like it works with mysqli :S</p>
  
  <p>So the question is, what is the issue here? Why can't I access to "setting_wall_post"? I guess that part is the problem since it works if I comment out that IF block.</p>