How to do Multiple Condition in SQL query using PHP and Ajax

AlineeApove

New Member
I have databse in MySQL with 21 fields which are listed below\[code\]Field Name Data Type NULLstatus text No roll_no text No branch_id int(5) No student_name text No father_name text No phone1 text No phone2 text No email text No dob date No city text No course_id varchar(5) No class_id int(2) No program text No duration text No comment text No admission_year int(4) No admission_date text No entryby text No address text No admission_no int(4) Nofees int(6) No\[/code\]Now I am stuck with search process, I bit confused, how can I perform search for different types of conditions/criteriaFew Examples of combinations of conditions[*]Only those records of city=3[*]Only those branch_id=2[*]Only those admission_year='2013'[*]Only those course_id='15'[*]Only those branch_id='2' AND course_id='15'[*]Only those branch_id='2' AND course_id='15' AND city LIKE 'XYZ'[*]Only those admission_year='2012' AND course_id='10' AND duration BETWEEN(2 AND 3)[*]Only those branch_id=2 AND course_id='15' AND student_name LIKE 'XYZ' [*]Only those course_id=7 AND class_id=2 AND father_name LIKE 'XYZ' My search.php form page is designed, I uploaded the image of form design here but I am confused how can I implement this search options for different situations. Please give me some guidance and show me the correct way to solve this issue.
 
Top