Query Runs in mysql but gives an error when I run in PHP here is the query
select p.pid as pid, s.sid as sid, s.status as staus, p.name as name, p.mobile as mobile, p.email as email, c.name as course from students as s, prospects as p, courses as c, batch as b where s.pid=p.pid and s.cid=c.id and s.bid=b.bid and s.status=true order by s.sid desc limit 0, 10