title: do i have to specify the database name in select statement while hosting?
body: <p>i am getting an error while querying this select statement.</p>
  
  <pre><code> $comments = dbgetvar("SELECT SUM(CASE WHEN c.approve = '1' AND c.spam = '0' THEN 1 ELSE 0 END) AS approved,
                         SUM(CASE WHEN c.approve = '0' AND c.spam = '0' THEN 1 ELSE 0 END) AS pending,
                         SUM(CASE WHEN c.spam = '1' THEN 1 ELSE 0 END) AS spam,
                         COUNT(*) AS count
                         FROM COMMENTS c");
  </code></pre>
  
  <p>the above code works fine on my local machine using WAMP server. but when i host it in my server powered by cpanel it gives the following error.</p>
  
  <blockquote>
    <p>Notice: dbget: Table
    'bhatkaln_test.COMMENTS' doesn't exist
    in SELECT SUM(CASE WHEN c.approve =
    '1' AND c.spam = '0' THEN 1 ELSE 0
    END) AS approved, SUM(CASE WHEN
    c.approve = '0' AND c.spam = '0' THEN
    1 ELSE 0 END) AS pending, SUM(CASE
    WHEN c.spam = '1' THEN 1 ELSE 0 END)
    AS spam, COUNT(*) AS count FROM
    COMMENTS c in
    /home/bhatkaln/public_html/test/admin-login/models/validation.php
    on line 154</p>
  </blockquote>
  
  <p>what does the above error mean? in the database the comments table do exist. </p>