CodeIgniter Forums
how to create this query - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: how to create this query (/showthread.php?tid=17960)



how to create this query - El Forum - 04-21-2009

[eluser]Unknown[/eluser]
select teacher.name, school.name from teacher, school where teacher.teacherID=teaching.teacherID and school.schoolID=teaching.schoolID and teacher.name like $data;

and for the data is insert by user from an input form....


how to create this query - El Forum - 04-21-2009

[eluser]kevinprince[/eluser]
Look at active record in the user guide, and look at doing a join rather than a cross table search.