CodeIgniter Forums
How use MATCH(action) AGAINST(?) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: How use MATCH(action) AGAINST(?) (/showthread.php?tid=92817)



How use MATCH(action) AGAINST(?) - motoroller - 04-28-2025

How use MATCH(action) AGAINST(?) in Query Builder Class
i have found only like mode


RE: How use MATCH(action) AGAINST(?) - InsiteFX - 04-28-2025

I found this one, give it a try.

Using Match and Against in MySQL and CodeIgniter


RE: How use MATCH(action) AGAINST(?) - WitER - 04-28-2025

(04-28-2025, 02:46 PM)motoroller Wrote: How use MATCH(action) AGAINST(?) in Query Builder Class
i have found only like mode

You can try to use RawSql:
PHP Code:
->where(new RawSql("MATCH(action) AGAINST ('words for search')")); 



RE: How use MATCH(action) AGAINST(?) - motoroller - 04-30-2025

(04-28-2025, 10:39 PM)WitER Wrote:
(04-28-2025, 02:46 PM)motoroller Wrote: How use MATCH(action) AGAINST(?) in Query Builder Class
i have found only like mode

You can try to use RawSql:
PHP Code:
->where(new RawSql("MATCH(action) AGAINST ('words for search')")); 

Got it how use variable? and prevent sql Inhections?

PHP Code:
->where(new RawSql("MATCH(action) AGAINST ($variable)")); 



RE: How use MATCH(action) AGAINST(?) - WitER - 05-01-2025

(04-30-2025, 06:54 AM)motoroller Wrote:
(04-28-2025, 10:39 PM)WitER Wrote:
(04-28-2025, 02:46 PM)motoroller Wrote: How use MATCH(action) AGAINST(?) in Query Builder Class
i have found only like mode

You can try to use RawSql:
PHP Code:
->where(new RawSql("MATCH(action) AGAINST ('words for search')")); 

Got it how use variable? and prevent sql Inhections?

PHP Code:
->where(new RawSql("MATCH(action) AGAINST ($variable)")); 

In a doc