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

  • Home
  • SEARCH
  • 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 8685565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:36:41+00:00 2026-06-12T22:36:41+00:00

Please can anyone tell me what’s wrong with this MySQL query SELECT count(items.id) AS

  • 0

Please can anyone tell me what’s wrong with this MySQL query

SELECT count(items.id) AS numrows 
FROM items, subcategories 
WHERE items.`base_school` = 'UNN' 
    AND items.subcategory = subcategories.id 
    AND subcategories.parent_category = 3 
JOIN `item_images` 
    ON items.id=`item_images`.`item_id`

It keeps throwing up this error:

#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
near ‘JOIN item_images ON items.id=item_images.item_id‘ at line
1

  • 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-06-12T22:36:44+00:00Added an answer on June 12, 2026 at 10:36 pm

    You have the WHERE clause in the wrong location, try this:

    SELECT count(items.id) AS numrows 
    FROM items
    INNER JOIN subcategories 
        ON items.subcategory = subcategories.id 
    INNER JOIN item_images 
        ON items.id=item_images.item_id
    WHERE items.base_school = 'UNN' 
        AND subcategories.parent_category = 3 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone please tell me how to extract this kind of data : [{number:8457215152,type:Cell,state:LA,country:US,tz:CT,zip:70546,msa:0},{number:4363685555,type:Cell,state:LA,country:US,tz:CT,zip:70546,msa:0}]
Can anyone please tell me why this might fail: afeder@ubuntu:~/android/toolchain/sysroot$ ls $PKG_CONFIG_SYSROOT_DIR/usr/local/lib/pkgconfig/mozjs185.pc /home/afeder/android/toolchain/sysroot/usr/local/lib/pkgconfig/mozjs185.pc afeder@ubuntu:~/android/toolchain/sysroot$
can anyone please tell me how to call the function GetDuration from within the
Can anyone please tell me the XML structure for sub-items that jqgrid uses. I've
Please Anyone can tell me why i got this kind of error: ACK=Failure&L_ERRORCODE0=81002&L_SHORTMESSAGE0=Unspecified%20Method&L_LONGMESSAGE0=Method%20Specified%20is%20not%20Supported&L_SEVERITYCODE0=Error
Can anyone please tell me how can I pass a list item from one
can anyone please tell about showing message box from MVC controller? The scenario is
can anyone please tell me why this simple regex is failing? $blogurl = 'http://www.sirpi.org/2011/02/23/';
can anyone please tell me where the margin/padding in for the pictures come from?
Can anyone please tell me if this can be done, and if yes, how?

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.