Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1838678
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:30:49+00:00 2026-05-17T06:30:49+00:00

i am getting an error while querying this select statement. $comments = dbgetvar(SELECT SUM(CASE

  • 0

i am getting an error while querying this select statement.

 $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");

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.

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

what does the above error mean? in the database the comments table do exist.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T06:30:50+00:00Added an answer on May 17, 2026 at 6:30 am

    You are testing your server on Windows, where the table names are not case sensitive, since they ultimately refer to files.

    When you upload to your Linux based server, the file system there is case sensitive. It doesn’t work because you specify COMMENTS but the table name, presumably, is comments.

    See Identifier Case Sensitivity in the MySQL manual for more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting error while using replace in an update statement in sql server 2008.
I´m getting this error while trying to commit to a svn repository: svn: MKACTIVITY
I am getting this error While running this LoadError: Expected /home/user/Desktop/Tripurari/myapp/app/models/host.rb to define Host##
I am getting this error while i am trying to upload a database that
i am getting this error while starting OracleMTSRecoveryService : Could not start the OracleMTSRecoveryService
I'm getting error while converting mysql insert statement into sql server 2008. because limit
Getting this error while trying to erase the last element of a list. I
Getting this error while compiling C++ code: undefined reference to `__stack_chk_fail' Options already tried:
I recently started getting this error while running gems or bundler. The only thing
I'm getting error while compiling qt project which #include's < qvaluelist.h > that this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.