![]() |
Using MATCH AGAINST in datamapper with select_func() - 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: Using MATCH AGAINST in datamapper with select_func() (/showthread.php?tid=54769) |
Using MATCH AGAINST in datamapper with select_func() - El Forum - 09-24-2012 [eluser]Unknown[/eluser] I am having a bad time trying to get a full text search to work in datamapper. From much googling and studying the documentation etc I have come up with the following code: Code: $search = new Plant(); this gives the error: Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"@genus","@species","@common_name") AGAINST ("daisy")() AS relevance FROM (`plan' at line 1 SELECT MATCH("@genus","@species","@common_name") AGAINST ("daisy")() AS relevance FROM (`plants`) WHERE MATCH("@genus","@species","@common_name") AGAINST ("daisy") HAVING `relevance` > 0.2 ORDER BY `relevance` desc Filename: C:\[my dev server]\system\database\DB_driver.php Line Number: 330 particularly puzzling is the '()' after ("daisy") - where does that come from? can anyone shed any light on this? |