• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    Unable to run mysql count(*) with multiple where conditions



    I am unable to run count(*) with multiple where conditions in mysql.


    I am running 

    SELECT count(*) as total FROM speed_videos WHERE `section_id` = 2 and `status` = 1

    giving no resuts even it has results. but same query with any one where condition giving results.


    Is issue from godaddy. i called godaddy support. there are just dummy.

    2 REPLIES 2
    Community Manager

    Hi @sankarsuda.  I'm not a MySql developer, but I'm guessing it would be easier for others to post a suggestion if they have more information about your particular database, like what it's structure is. It would probably also be helpful to know what version of MySql you are using. Hope you're able to figure it out. 


    JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.

    Hi @sankarsuda,

    Yes, as @JesseW said, it would be helpful to know the structure of your table to see if the sql query is right.

    Also, have you changed anything in your server / account that may triggered the issue?

    If your query is ran by PHP, have you checked that all your mysql modules are active?


    Also, what happens if you run the query through phpMyAdmin or mysql command from shell?


    Hope it helps!


    If you find my replies helpful, give me a like or kudo 🙂
    And if I solved your issue, mark it as solution 😄