random1 Posted May 4, 2010 Share Posted May 4, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/200660-mysql-generic-search-functionprocedure/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.