搜索栏查询不起作用

时间:2016-06-02 06:53:53

标签: mysql

搜索栏带有文本字段和下拉列表 用户键入文本并选择一个课程然后提交 我需要获取那些用户选择相同课程的行的结果。

my db have two tables currently  
1.content_ref_table  with fields   
title,description,content_url,course_id(fk)  

2.course_ref_table with columns  
course_id(pk),courses 

我想出了这个查询,但mysql不支持like和in operator在一起我想,建议我一些查询

select title,description,content_url from content_ref_table where title like '%eco%' and course_id  in (select course_id from course_ref_table where courses = 'b.com'  

1 个答案:

答案 0 :(得分:1)

使用表格中的连接尝试此操作:

wait_for_bind
相关问题