PHP Classes
elePHPant
Icontem

Keywords search on multiple table fields of a MySQL database: Search two fields of MySQL database for multiple keywords

Recommend this page to a friend!
  All requests RSS feed  >  Keywords search on multiple table fie...  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

Keywords search on multiple table fields of a MySQL database

Edit

Picture of domenic by domenic - 1 year ago (2015-05-06)

Search two fields of MySQL database for multiple keywords

This request is clear and relevant.
This request is not clear or is not relevant.

+2

I would like to search for multiple keywords of different fields and return results as table.

Ask clarification

2 Recommendations

PHP Search: Search for data MySQL tables and show the results

This recommendation solves the problem.
This recommendation does not solve the problem.

0

Picture of Manuel Lemos by Manuel Lemos Reputation 15175 - 1 year ago (2015-05-11) Comment

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. 


Database Manager: Connect and query several databases using PDO

This recommendation solves the problem.
This recommendation does not solve the problem.

0

Picture of Samuel Adeshina by Samuel Adeshina package author package author Reputation 785 - 1 year ago (2015-05-10) Comment

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

  • 4 Comments
  • 1. Picture of Manuel Lemos by Manuel Lemos - 1 year 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. Picture of Dave Smith by Dave Smith - 1 year 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. Picture of Manuel Lemos by Manuel Lemos - 1 year 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. Picture of domenic by domenic - 1 year 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.


Recommend package
: 
: