Shea Posted May 5, 2008 Share Posted May 5, 2008 Hi! Sorry if this has already been posted, but I can't seem to find it. The query is: SELECT * FROM `posts` WHERE (month='10' AND year='2007') I've run it through PHP MyAdmin and it works perfectly. When I run it though PHP, I've been getting the following error: Unknown column 'month' in 'where clause' I know the column is there. The query is just unable to find it for some reason. Any help would be much appreciated. MySQL version: 5.0.16 Quote Link to comment Share on other sites More sharing options...
dooper3 Posted May 5, 2008 Share Posted May 5, 2008 try removing the brackets Quote Link to comment Share on other sites More sharing options...
fenway Posted May 5, 2008 Share Posted May 5, 2008 try removing the brackets Um, no. You're likely not connecting to the right host/DB. Quote Link to comment Share on other sites More sharing options...
Shea Posted May 5, 2008 Author Share Posted May 5, 2008 fenway, that was it! Thank you! It was still hooked up to the old database. 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.