Chupa85 Posted April 9, 2008 Share Posted April 9, 2008 I am having a problem with my WHERE clause for my query. My MySQL version is 4.0 Here is the query. SELECT * FROM `PageContent` WHERE `PageName` = Home I am getting the error message #1054 - Unknown column 'Home' in 'where clause'. I am just trying to pull the data in the PageContent column that is relevant to the desired PageName, in this case home. The table is just these 2 columns. I have tried the query with ' marks around Home but it didn't do anything different. I am really at a loss. I know that Home is in the PageName field. Any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
paul2463 Posted April 9, 2008 Share Posted April 9, 2008 if you are checking it against the string "HOME" then that is the way it should look Quote Link to comment Share on other sites More sharing options...
fenway Posted April 9, 2008 Share Posted April 9, 2008 If Home is a string literal, quote it. Quote Link to comment Share on other sites More sharing options...
Chupa85 Posted April 9, 2008 Author Share Posted April 9, 2008 For some reason it just started working. Thanks for the help guys. That was kinda wierd but as long as it is working I'm happy. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.