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 8558453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:48:55+00:00 2026-06-11T15:48:55+00:00

Here is my database structure https://docs.google.com/open?id=0B9ExyO6ktYcOenZ1WlBwdlY2R3c My SQL query looks like that SELECT u.fullname,

  • 0

Here is my database structure

https://docs.google.com/open?id=0B9ExyO6ktYcOenZ1WlBwdlY2R3c

My SQL query looks like that

SELECT
    u.fullname,
    a.id,
    a.content,
    a.addDT,
    a.`right`,
    acr.score,
    acr.checkDT
FROM
    answers a,
    users u
LEFT JOIN `answer_chk_results` acr ON acr.aid = a.id
WHERE
    a.qid = 7
AND u.id = a.uid
GROUP BY
    a.`right` DESC

Getting error message

[Err] 1054 - Unknown column 'a.id' in 'on clause'

I’m pretty sure that a.id column exists

What am I missing?

  • 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-11T15:48:56+00:00Added an answer on June 11, 2026 at 3:48 pm

    you can’t mix join syntax with comma delimited table syntax. If you are going to left join, you need to use an inner join for the other two tables.

    SELECT
        u.fullname,
        a.id,
        a.content,
        a.addDT,
        a.`right`,
        acr.score,
        acr.checkDT
    FROM
        answers a
        INNER JOIN users u ON u.id = a.uid
    LEFT JOIN `answer_chk_results` acr ON acr.aid = a.id
    WHERE
        a.qid = 7
    GROUP BY
        a.`right` DESC
    

    This might work also, but is not guranteed:

    SELECT
        u.fullname,
        a.id,
        a.content,
        a.addDT,
        a.`right`,
        acr.score,
        acr.checkDT
    FROM
        (answers a,
        users u)
    LEFT JOIN `answer_chk_results` acr ON acr.aid = a.id
    WHERE
        a.qid = 7
    AND u.id = a.uid
    GROUP BY
        a.`right` DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here an example my database structure.. uid email name ------------------------------- 1 john@gmail.com John 2
Ok, here we go... I have a select query accessing a very abstract database.
Here is my PHP database structure: http://pastebin.com/x89AdzfS I've been trying for hours to get
We have an Oracle database here that's been around for about 10 years. It's
Just getting into SQL stored queries right now... anyway, here's my database schema (simplified
here is my database structure members table member_Id membertomshiptable membertomship_startdate membertomship_enddate member_id mshipstatustype_id membershipstatustypetable
here's the table structure -- phpMyAdmin SQL Dump -- version 3.4.10.1 -- http://www.phpmyadmin.net --
Google News has API, described here: http://code.google.com/apis/newssearch/v1/index.html But it is a JavaScript API (client
I'm running WordPress and I'd like to write a custom query that would show
I am trying to map a legacy database here and I'm running into a

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.