CodeIgniter Forums
How to search ALOT of fields? - 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 search ALOT of fields? (/showthread.php?tid=52794)



How to search ALOT of fields? - El Forum - 06-26-2012

[eluser]trope[/eluser]
I need to have a search feature on my site.

I have over 20 fields that the user can search by ( ie. first name, last, email, city, etc )

I am confused as to how to approach this.

Is this the correct way?

Code:
MODEL:
------

function search($fName = '', $lName = '' .. etc ){}

and from my view just pass all the values from the search form?


I don't need actual code, ( although would be HIGHLY appreciated ) , I just need a small example of how to approach searching so many fields.

Thank you!