-
April 10th, 2013, 07:15 AM
#1
Database Error 1242 while filtering data record
I am getting the following error while trying to filter record in Database.
Fatal error: Database error 1242: Subquery returns more than 1 row
Invalid SQL: SELECT EP.es_preadmissionid, EP.pre_name, (SELECT roll_no FROM es_sections_student ESS WHERE ESS.student_id=EP.es_preadmissionid ) AS ROLL_NO, (SELECT section_id FROM es_sections_student ESS WHERE ESS.student_id=EP.es_preadmissionid) AS SECTION FROM es_preadmission EP , es_preadmission_details EPD where EP.pre_status !='inactive' AND EPD.es_preadmissionid=EP.es_preadmissionid AND EPD.pre_class=1 ORDER BY es_preadmissionid ASC in /home/content/16/9882416/html/products.projectdesk.info/s-erp/office_admin/includes/classes/developer.mysql.class.php*on line 136
Can anybody help me out in solving above error that why is it occuring????
Live Project Training
-
April 10th, 2013, 08:38 AM
#2
Re: Database Error 1242 while filtering data record
It means IMHO that at least on of these SQL expressions:
Code:
(SELECT roll_no FROM es_sections_student ESS WHERE ESS.student_id=EP.es_preadmissionid ) AS ROLL_NO
(SELECT section_id FROM es_sections_student ESS WHERE ESS.student_id=EP.es_preadmissionid) AS SECTION
may return more than one records while either of expressions must return either one record or nothing.
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|