Jump to content

MySQL generic search function/procedure?


random1

Recommended Posts

Hey All,

 

Is there a way to make a generic search function in MySQL?

 

I have the code so far:

 

SELECT `product_name`, `product_description`,
`product_price_euros`
FROM `product`
WHERE `product_status_id` != 0
AND `product_name` LIKE '%S%'
ORDER BY `product_name`
LIMIT 10;

 

I'd like to create a procedure/function from this that can be used to search any table in my database. Any ideas? Can I set up parameters and pass them as normal?

Link to comment
https://forums.phpfreaks.com/topic/200660-mysql-generic-search-functionprocedure/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.