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

Recommended Answers

All 2 Replies

If the query runs correctly within MySQL but not within PHP then I would suggest that the problem lies within your PHP code.

Which you haven't given us.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.