php - QUERY NOT EXECUTED IN SQL (WHERE CLAUSE) -


$coursearr = $this->query('              select  courses.*,modules.*               courses               inner join student_courses              on student_courses.student_id = "'.$student_id.'"               , courses.id=student_courses.course_id                inner join modules               on modules.course_id=courses.id               , courses.course_title "$search%" ;              '); 

try this:

$coursearr = $this->query('select  courses.*,modules.* courses inner join student_courses on student_courses.student_id="'.$student_id.'" , courses.id=student_courses.course_id  inner join modules on modules.course_id=courses.id  courses.course_title "'.$search.'%"'); 

you using $search in ' single quotes. "semi colon" , "and" removed


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -