
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."

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

$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."

There is one I have found extremely helpful from Particle Tree [ http://particletree.com/notebook/ranked-searches-with-sql/]. You can try it out. You might, however, have to forego the convenience of CodeIgniter's (?) query builder methods and write the queries yourself. The other great thing about Particle Tree's search method/strategy/query is that it doesnt rely on fulltext indexes, so you can use it on Innodb tables as well. Good luck! -- Ndungi Kyalo "if you want to go fast go alone, if you want to go far get company" biblia.kenya.or.ke On Fri, Dec 11, 2009 at 5:53 AM, Isaak Mogetutu <imogetutu@googlemail.com>wrote:
$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." _______________________________________________ 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

okay just wrote a query for the search but its works only for exact matches How do i make it work with fuzzy searches. Code: SELECT *, MATCH( position ) AGAINST('%$q%') OR MATCH( dept_name ) AGAINST('%$q%') AS score FROM vacancy LEFT JOIN departments ON vacancy.dept_no = departments.dept_id WHERE MATCH( position ) AGAINST('%$q%') OR MATCH( dept_name ) AGAINST('%$q%') On Fri, Dec 11, 2009 at 10:02 AM, Ndungi Kyalo <ndungi@gmail.com> wrote:
There is one I have found extremely helpful from Particle Tree [ http://particletree.com/notebook/ranked-searches-with-sql/]. You can try it out. You might, however, have to forego the convenience of CodeIgniter's (?) query builder methods and write the queries yourself.
The other great thing about Particle Tree's search method/strategy/query is that it doesnt rely on fulltext indexes, so you can use it on Innodb tables as well.
Good luck! -- Ndungi Kyalo
"if you want to go fast go alone, if you want to go far get company" biblia.kenya.or.ke
On Fri, Dec 11, 2009 at 5:53 AM, Isaak Mogetutu <imogetutu@googlemail.com>wrote:
$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." _______________________________________________ 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
_______________________________________________ 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
-- Pablo Picasso<http://www.brainyquote.com/quotes/authors/p/pablo_picasso.html> - "Computers are useless. They can only give you answers."

Greetings Mr Isaak, I do not think mysql's match() has a facility for the fuzzy searches you need. you might have to generate the permutations of the search terms youself and then pas them on to match() .. against(). Fuzzy searches are a bit of a hack, at least for me. Supposing you were searching for the phrase "Management Trainees" you would need to first search for an exact match of "Management Trainees" then probably search for the singular form "Management Trainee" {just stripping the 's' and doing the search again}, break the word into two separate terms "Management" and "Trainee" then search for all possible combinations of the phrase.. ad infinitum. -- Ndungi Kyalo biblia.kenya.or.ke i tweet! @ndungikyalo On Fri, Dec 11, 2009 at 8:37 AM, Isaak Mogetutu <imogetutu@googlemail.com>wrote:
okay just wrote a query for the search but its works only for exact matches
How do i make it work with fuzzy searches.
Code:
SELECT *, MATCH( position ) AGAINST('%$q%') OR MATCH( dept_name ) AGAINST('%$q%') AS score FROM vacancy LEFT JOIN departments ON vacancy.dept_no = departments.dept_id WHERE MATCH( position ) AGAINST('%$q%') OR MATCH( dept_name ) AGAINST('%$q%')
On Fri, Dec 11, 2009 at 10:02 AM, Ndungi Kyalo <ndungi@gmail.com> wrote:
There is one I have found extremely helpful from Particle Tree [ http://particletree.com/notebook/ranked-searches-with-sql/]. You can try it out. You might, however, have to forego the convenience of CodeIgniter's (?) query builder methods and write the queries yourself.
The other great thing about Particle Tree's search method/strategy/query is that it doesnt rely on fulltext indexes, so you can use it on Innodb tables as well.
Good luck! -- Ndungi Kyalo
"if you want to go fast go alone, if you want to go far get company" biblia.kenya.or.ke
On Fri, Dec 11, 2009 at 5:53 AM, Isaak Mogetutu <imogetutu@googlemail.com
wrote:
$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." _______________________________________________ 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
_______________________________________________ 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
--
Pablo Picasso<http://www.brainyquote.com/quotes/authors/p/pablo_picasso.html> - "Computers are useless. They can only give you answers." _______________________________________________ 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

if you are doing large scale searches that require "crazy" combinations on a very large dataset , you may want to checkout www.sphinxsearch.com On Fri, Dec 11, 2009 at 11:57 AM, Ndungi Kyalo <ndungi@gmail.com> wrote:
Greetings Mr Isaak,
I do not think mysql's match() has a facility for the fuzzy searches you need. you might have to generate the permutations of the search terms youself and then pas them on to match() .. against().
Fuzzy searches are a bit of a hack, at least for me. Supposing you were searching for the phrase "Management Trainees" you would need to first search for an exact match of "Management Trainees" then probably search for the singular form "Management Trainee" {just stripping the 's' and doing the search again}, break the word into two separate terms "Management" and "Trainee" then search for all possible combinations of the phrase.. ad infinitum.
-- Ndungi Kyalo biblia.kenya.or.ke
i tweet! @ndungikyalo
On Fri, Dec 11, 2009 at 8:37 AM, Isaak Mogetutu <imogetutu@googlemail.com>wrote:
okay just wrote a query for the search but its works only for exact matches
How do i make it work with fuzzy searches.
Code:
SELECT *, MATCH( position ) AGAINST('%$q%') OR MATCH( dept_name ) AGAINST('%$q%') AS score FROM vacancy LEFT JOIN departments ON vacancy.dept_no = departments.dept_id WHERE MATCH( position ) AGAINST('%$q%') OR MATCH( dept_name ) AGAINST('%$q%')
On Fri, Dec 11, 2009 at 10:02 AM, Ndungi Kyalo <ndungi@gmail.com> wrote:
There is one I have found extremely helpful from Particle Tree [ http://particletree.com/notebook/ranked-searches-with-sql/]. You can try it out. You might, however, have to forego the convenience of CodeIgniter's (?) query builder methods and write the queries yourself.
The other great thing about Particle Tree's search method/strategy/query is that it doesnt rely on fulltext indexes, so you can use it on Innodb tables as well.
Good luck! -- Ndungi Kyalo
"if you want to go fast go alone, if you want to go far get company" biblia.kenya.or.ke
On Fri, Dec 11, 2009 at 5:53 AM, Isaak Mogetutu < imogetutu@googlemail.com> wrote:
$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." _______________________________________________ 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
_______________________________________________ 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
--
Pablo Picasso<http://www.brainyquote.com/quotes/authors/p/pablo_picasso.html> - "Computers are useless. They can only give you answers." _______________________________________________ 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
_______________________________________________ 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

On Fri, Dec 11, 2009 at 11:57 AM, Ndungi Kyalo <ndungi@gmail.com> wrote:
Greetings Mr Isaak,
I do not think mysql's match() has a facility for the fuzzy searches you need. you might have to generate the permutations of the search terms youself and then pas them on to match() .. against().
Fuzzy searches are a bit of a hack, at least for me. Supposing you were searching for the phrase "Management Trainees" you would need to first search for an exact match of "Management Trainees" then probably search for the singular form "Management Trainee" {just stripping the 's' and doing the search again}, break the word into two separate terms "Management" and "Trainee" then search for all possible combinations of the phrase.. ad infinitum.
Also known as the porter stemming algorithm<http://tartarus.org/%7Emartin/PorterStemmer/index.html>, a certain skunk taught this to me way back in time :-) PHP implementations of that algorithm can be found here: http://www.phpguru.org/static/PorterStemmer.html http://tartarus.org/~martin/PorterStemmer/php.txt<http://tartarus.org/%7Emartin/PorterStemmer/php.txt>
participants (5)
-
Isaak Mogetutu
-
Kiti Chigiri
-
Ndungi Kyalo
-
Peter Karunyu
-
solomon kariri