DATABASE ERROR : select s.*, (select title from tbl_academics where id=s.academics) as academics, (select Program_name from tbl_program where pid=s.program) as program_name, DATE_FORMAT(s.created_on,'%d-%m-%Y %T') as created_on, if(s.last_modified='0000-00-00 00:00:00','',DATE_FORMAT(s.last_modified,'%d-%m-%Y %T')) as last_modified from tbl_syllabus s where id='504' and status=(select option_id from tbl_options where option_type='Status' and option_desc='Active' LIMIT 0,1) Subquery returns more than 1 row