title: Rows number check in PHP
body: <p>I am trying to check if there were any records (more than 0) in my database table:</p>
  
  <pre><code>        $ifExists = DB::select('SELECT COUNT(*) FROM `characters` WHERE userid = ?', array(Auth::id()));
  </code></pre>
  
  <p>Now I am checking if there are more than 0:</p>
  
  <pre><code>   if($ifExists &gt; 0){
                  return Redirect('/board');
              }
              else{
                  return view('intro');
              }
  </code></pre>
  
  <p>It always takes me to the <code>/board</code>. But there are many rows in this database table.</p>
  
  <p>The <code>echo $ifExists;</code> shows me <code>[{"COUNT(*)":0}]</code></p>
  
  <p>How do I check this number? </p>