webguync Posted March 12, 2010 Share Posted March 12, 2010 I am getting a MySQL error telling me the field is unknown when I know it is there. MySQL Error: Unknown column 'tbl_log.user_id' in 'where clause' WHERE tbl_roster.user_id = tbl_log.user_id I have another table with the exact same MySQL structure and when I SQL that it displays fine? Any ideas why it would do this? Link to comment https://forums.phpfreaks.com/topic/195059-not-sure-why-i-am-getting-an-mysql-error/ Share on other sites More sharing options...
Maq Posted March 12, 2010 Share Posted March 12, 2010 It means that the column 'user_id' doesn't exist in the table 'tbl_log'. If you disagree then could you please post the structure of that table. (describe tbl_log;) Link to comment https://forums.phpfreaks.com/topic/195059-not-sure-why-i-am-getting-an-mysql-error/#findComment-1025372 Share on other sites More sharing options...
webguync Posted March 15, 2010 Author Share Posted March 15, 2010 yea I do disagree CREATE TABLE `log_March2010` ( `log_id` int(11) NOT NULL auto_increment, `user_id` int(11) default NULL, `section` int(11) default NULL, `date` int(11) default NULL, `attempt` int(11) default NULL, PRIMARY KEY (`log_id`) ) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ; Link to comment https://forums.phpfreaks.com/topic/195059-not-sure-why-i-am-getting-an-mysql-error/#findComment-1026372 Share on other sites More sharing options...
webguync Posted March 16, 2010 Author Share Posted March 16, 2010 any ideas on this? Link to comment https://forums.phpfreaks.com/topic/195059-not-sure-why-i-am-getting-an-mysql-error/#findComment-1027117 Share on other sites More sharing options...
Kiwii Posted March 16, 2010 Share Posted March 16, 2010 the table you created is called 'log_March2010' not 'tbl_log' Link to comment https://forums.phpfreaks.com/topic/195059-not-sure-why-i-am-getting-an-mysql-error/#findComment-1027123 Share on other sites More sharing options...
jskywalker Posted March 16, 2010 Share Posted March 16, 2010 It means that the column 'user_id' doesn't exist in the table 'tbl_log'. If you disagree then could you please post the structure of that table. (describe tbl_log;) you please post the structure of that table. (describe tbl_log;) NOT: CREATE TABLE `log_March2010` ( that seems to be another table?????????? Link to comment https://forums.phpfreaks.com/topic/195059-not-sure-why-i-am-getting-an-mysql-error/#findComment-1027125 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.