Welcome Guest, Not a member yet? Register   Sign In
Running a Basic Search
#4

[eluser]TG JoE[/eluser]
Ha! Not a school assignment. I used to do more CI development back in the day but moved to Wordpress about a year ago. So now that a buddy asked me to do this for him "real quick", I was like "yeah, sure. Should be easy enough."

The example posted is how I was thinking it would be written, the long way. Grabbing each post variable, running the query on it and having a query for each single post variable and then writing more queries to handle each combination of variables as well. Then probably calling the correct model through a switch statement depending on which form values actually had inputs.

Is that the best way? I think I was looking for some way to dynamically generate the query string so it only has to be written once and will just an accept an array of $_POST variables to generate the results.


Messages In This Thread
Running a Basic Search - by El Forum - 09-12-2010, 11:15 PM
Running a Basic Search - by El Forum - 09-13-2010, 03:28 AM
Running a Basic Search - by El Forum - 09-13-2010, 05:49 AM
Running a Basic Search - by El Forum - 09-13-2010, 07:00 AM
Running a Basic Search - by El Forum - 09-13-2010, 08:29 AM
Running a Basic Search - by El Forum - 09-13-2010, 06:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB