
$array = array('vacancy_position' => $this->input->post('q'), 'department_name' => $this->input->post('q'), 'vacancy_status' => $this->input->post('q') ); $this->db->select('*'); $this->db->from('vacancy'); $this->db->join('departments', 'vacancy.dept_no = departments.dept_id'); $this->db->like($array); i want to search vacancy and departments table where vacancy.department.id = departments.department.id from colums vacancy(position,status) and departments(deparment_name) where search query('q') matches any of the three columns. On Fri, Dec 11, 2009 at 8:42 AM, solomon kariri <solomonkariri@gmail.com>wrote:
Wah you just like posed a universal set statement dude. There is nothing that seems to be the problem here neither does it sound like you want any help. You did not even specify what u have done so far. http://www.sqlcourse.com/ That will help
On Fri, Dec 11, 2009 at 8:33 AM, Isaak Mogetutu <imogetutu@googlemail.com>wrote:
Hi Skunks,
I am trying to search multiple tables and columns just can't seem to get the query right.
regards
Mogetutu
o_O? --
Marie von Ebner-Eschenbach<http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html> - "Even a stopped clock is right twice a day."
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
-- Solomon Kariri,
Software Developer, Cell: +254736 729 450 Skype: solomonkariri
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
-- Samuel Goldwyn<http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html> - "I'm willing to admit that I may not always be right, but I am never wrong."