MySQL - Error 1054 : Unknown column in 'field list' when column actually exists.
I have a simple update query that is failing with the following errror...
Error 1054 : Unknown column 'Display' in 'field list'
The column does exist in the database and I have checked to make sure there are no spaces or anything quirky like that going on. I have tried moving, dropping, and re-creating the columns with no success. I am using MySQL version 5.6.17 The code that produces the error is as follows...
1. Double-check to make sure you're connecting to the right database. :) I've seen people forget that they're connecting to a development database, which doesn't have the latest columns, and when they check to see if the column exists, they check a production database or something, so they THINK it's there, but it's really just a different database.
2. Do you use column permissions at all?
3. What happens if you run a query to show the columns?
Positive I am using the correct db because it's an include file used for each connection. If I dump $querystring to the screen and then copay and paste into phpAdmin, where it actually shows the field for the table, it still fails with the same error. As for the results of that query you asked me to run...
I don't think so - that error is just what you get back from MySQL.
medievalman
ASKER
Remember to check and see if underlying Triggers could be the cause of an error where it appears your SQL is correct. MySQL did not tell me it was a different table or a trigger causing the error. Just that there was an error.
2. Do you use column permissions at all?
3. What happens if you run a query to show the columns?
Open in new window
What's the output there?