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

The Archive Base Latest Questions

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

I am getting the error described in title: Unknown column ‘FeedbackType’ in ‘where clause’

  • 0

I am getting the error described in title:

Unknown column 'FeedbackType' in 'where clause'

But I don’t understand why. This is my query:

SELECT SQL_CALC_FOUND_ROWS `Appointments`.ID, FeedbackType, FeedbackSubType 
FROM `UserFeedback`
INNER JOIN `Appointments` ON `Appointments`.ID = `UserFeedback`.Appointments_ID 
INNER JOIN `Reasons` ON `UserFeedback`.FeedbackSubType = `Reasons`.ID  
WHERE `FeedbackType` = 1  ORDER BY `Appointments`.ID ASC
LIMIT 0, 10

FeedbackType is a column in the UserFeedback table, casing is correct, checked it several times already.

For completeness, this is the table schema:

CREATE TABLE IF NOT EXISTS `UserFeedback` 
(
   ID bigint(20) NOT NULL AUTO_INCREMENT,
   FeedbackType int(4) NOT NULL,
   FeedbackSubType int(4) NOT NULL,
   Notes varchar(170) NULL,
   Appointments_ID bigint(20) NOT NULL,
   IpTracking_ID bigint(20) NOT NULL,
   PRIMARY KEY (ID),
   FOREIGN KEY (Appointments_ID) REFERENCES Appointments(Id), 
   FOREIGN KEY (IpTracking_ID) REFERENCES IpTracking(Id)    
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

What could be the issue?

[Edit]

These variants don’t work either (because FeedbackType does not contain reserved words/characters and belongs only to the UserFeedback table):

... WHERE UserFeedback.FeedbackType = 1
... WHERE `UserFeedback`.`FeedbackType` = 1
... WHERE FeedbackType = '1'
etc.

(and I actually see no reason why they should)

[Edit 2]

I ran SELECT * FROM UserFeedback to make sure it really contains the column, and I got several rows, all containing the column (well, INSERTs worked without errors).

For each of the mentioned variants, I always get the same error, always in the WHERE clause. If I omit the WHERE clause, I get unfiltered results (including the FeedbackType column in those results), so it’s really confusing.

[Solution]

For some reason, replacing the WHERE query with a condition inside INNER JOIN fixed it, as @MarinSagovac suggested in his second snippet:

SELECT SQL_CALC_FOUND_ROWS `Appointments`.ID, FeedbackType, FeedbackSubType 
FROM `Appointments`
INNER JOIN `UserFeedback` ON `Appointments`.ID = `UserFeedback`.Appointments_ID 
   AND `UserFeedback`.FeedbackType = 1
INNER JOIN `Reasons` ON `UserFeedback`.FeedbackSubType = `Reasons`.ID  
ORDER BY `Appointments`.ID ASC
LIMIT 0, 10

Note that there’s no WHERE clause now, but the semantics should be the same, right? And it’s clear that the column really exists, so the error message is a bit misleading IMHO.

  • 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-12T19:42:37+00:00Added an answer on June 12, 2026 at 7:42 pm

    Try add backtick:

    SELECT SQL_CALC_FOUND_ROWS `Appointments`.ID, `FeedbackType`, `FeedbackSubType`
    FROM `UserFeedback`
    INNER JOIN `Appointments` ON `Appointments`.ID = `UserFeedback`.Appointments_ID 
    INNER JOIN `Reasons` ON `UserFeedback`.FeedbackSubType = `Reasons`.ID  
    WHERE `FeedbackType` = 1  ORDER BY `Appointments`.ID ASC
    LIMIT 0, 10
    

    Added try:

    SELECT SQL_CALC_FOUND_ROWS `Appointments`.ID, FeedbackType, FeedbackSubType 
    FROM `UserFeedback`
    INNER JOIN `Appointments` ON `Appointments`.ID = `UserFeedback`.Appointments_ID 
    INNER JOIN `Reasons` ON `UserFeedback`.FeedbackSubType = `Reasons`.ID  
    INNER JOIN `UserFeedback`.`FeedbackType` = 1  ORDER BY `Appointments`.ID ASC
    LIMIT 0, 10
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting this error, when starting spec tests. I understand that connection with
I am getting an error described in the title when I try to run
Getting error when I tried like this: $ci =& get_instance(); $ci->db->select(CONCAT_WS(' ',users.name_first,users.name_last) AS user_name,CONCAT_WS('
I am getting this error while following the tutorial from railstutorial.org. Model class :
I'm getting the same kind of error as described here . I'm running in
As the title says, I'm getting a compiler error in a VS2008 C++ program.
I'm getting this error when i try to create a Lecture via my Lecture
Why am I getting a syntax error with the following line? statement = self.sql.execute(DESCRIBE
getting error while try to start service
Getting error while inserting values into database (SQL Server 2008) Implicit conversion from data

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.