this is my PHP variable which contain the query and this just return all the rows but works well in MYSQL.
$search="SELECT course_table.thumbnail,