|All requests||>||Keywords search on multiple table fie...||>||Request new recommendation||>||Featured requests||>||No recommendations|
by domenic - 7 years ago (2015-05-06)
I would like to search for multiple keywords of different fields and return results as table.
This class seems to do exactly what you ask, search MySQL tables for given fields with given keywords and then display the results in a HTML table.
The only details is that it uses the mysql extension that is being deprecated in PHP 5.5.
You can use this class to perform a lot of database operations. To search for multiple fields in a mysql table, you need to pass in a query that looks like this: SELECT * FROM [The Field You want to search from] WHERE [what you are searching for] LIKE [what you want it to look like] OR .... If you want your result as table, all you have to do is format the resulting array generated from the execution of the query to look like a table
1. by Manuel Lemos - 7 years ago (2015-05-11) Reply
I guess the original poster wants a solution that composes and executes the search query from parameters that define the keywords to search and then displays the output on a HTML table.
2. by Dave Smith - 7 years ago (2015-05-11) in reply to comment 1 by Manuel Lemos Reply
He actually posted this request right after I made a recommendation to a similar request, rewording it slightly. I think he is after how to do it and not a class to do it for him.
3. by Manuel Lemos - 7 years ago (2015-05-11) in reply to comment 2 by Dave Smith Reply
Maybe you are right Dave. Anyway, with a class he can look at the code and learn how to do it.
4. by domenic - 7 years ago (2015-05-11) in reply to comment 3 by Manuel Lemos Reply
Thanks for the suggestions. I have a functioning system, but I was wondering how someone else may approach the code with security in mind. I've downloaded the suggestions and appreciate the responses. Thanks.