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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

mysqli - Php Mysqli_fetch_assoc Error : "Warning: Illegal string offset 'name' in" -

c - "error: subscripted value is neither array nor pointer nor vector", but why? -