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 - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -