MySQL query error!

MySQL query error!



Error: Subquery returns more than 1 row
Query: SELECT t.*,(SELECT COUNT(*) FROM turio_tracker_posts WHERE topicid=t.id) as num_posts, ulp.username as lastposter, ulp.id as lastposter_uid, p.added as start_date, us.username as starter, IF(t.lastpost<=(SELECT lastpostread FROM turio_tracker_readposts rp WHERE rp.userid=1 AND rp.topicid=t.id) OR t.lastpost IS NULL,'unlocked','unlockednew') as img FROM turio_tracker_topics t LEFT JOIN turio_tracker_users us ON t.userid=us.id LEFT JOIN turio_tracker_posts p ON t.lastpost=p.id LEFT JOIN turio_tracker_users ulp ON p.userid=ulp.id WHERE forumid=10 ORDER BY sticky, lastpost DESC LIMIT 0,50

Back