i have to do search from multiple tables like student (student info. ), master( client_id, class, section), student_sec (secondary info of student )
i have written teh query as follows,
SELECT st.sno sss,st.name names,mt.class cl,mt.section sec FROM student st, master mt,student_sec_info st_sec WHERE st.master_sno=mt.sno and st.sno=st_sec.st_sno and mt.client_id='27' OR st.name LIKE 'Abhi%' OR st.p_mobile LIKE 'Abhi%' OR st.email LIKE 'Abhi%' OR st_sec.f_name LIKE 'Abhi%' OR st_sec.f_name LIKE 'Abhi%' OR st_sec.m_occ LIKE 'Abhi%' OR st_sec.caste LIKE 'Abhi%' OR st_sec.subcaste LIKE 'Abhi%'OR st_sec.p_add LIKE 'Abhi%' OR st_sec.c_add LIKE 'Abhi%' LIMIT 20
Thru the above query, iam getting other clients students also.....
pls send the exact wuery for search ( having more than 5 like operators, 3 joining tables, one exact condition like client in my query..)
PLease it is urgent , Thanks in Advance...