title: Why does this 'case' query not return 'true' or 'false' in codeigniter
body: <p>I have a query that checks if a row from a table exists. It should return a 'true' or  'false' value, but this is not the case.</p>
  
  <p>The query and code look as follows. I should mention that I use the CodeIgniter framework, hence the object names and function names.</p>
  
  <pre><code>$query="SELECT CASE WHEN EXISTS
                  (
                  SELECT * FROM Users
                  WHERE Email=".$this-&gt;db-&gt;escape($email)."
                  AND PassWord=MD5(".$this-&gt;db-&gt;escape($password).")
                  )
                  THEN 'TRUE'
                  ELSE 'FALSE'
                  END";
  
              $result=$this-&gt;users_db-&gt;query($query);  
              $resulting_array=$result-&gt;row();
  
              echo "&lt;pre&gt;".var_dump($resulting_array)."&lt;/pre&gt;";
  </code></pre>
  
  <p>This code gives the following result:</p>
  
  <pre><code>object(stdClass)#22 (1) {
    ["CASE WHEN EXISTS
                  (
                  SELECT * FROM Users
                  WHERE Email='r.blaauwen@erasmusmc.nl'
                  AND PassWord=MD5('rrt')
                  )
                  THEN 'TRUE'
                  ELSE 'FALSE'
                  END"]=&gt;
    string(5) "FALSE"
  }
  </code></pre>
  
  <p>It seems <code>$result-&gt;row();</code> delivered an object instead of an array/string/boolean. The 'FALSE' result is there, but I don't know how to retrieve it.</p>