2016-06-08 145 views
0

正在开发Web应用程序(学生讨论平台)。 我想在学生登录时提取并计算其他学生发布的最新发布文章(未读文章)的数量。 问题是它只提取那些匹配的。 可能是什么错误从ID不匹配的另一个表中选择数据

表:

-students(regno,name,faculty_code) PRIMARY KEY (regno) 

- articles(art_id,content,regno,faculty_code,date,time)

-comments(com_id,art_id,co_content,regno,date,time) 

我想 select articles.art_id and comments.art_id where articles.art_id is not equal comments.art_id and commens.regno='$

回答

0

是不是很明显?您应该使用commens.regno!='$而不是commens.regno='$

相关问题