How to order mysql results by column priority?
Example. I have a product table, the table contains two columns, product name (p.name) and product description (p.desc).
Users should be able to enter keywords to search for products in the database.
"p.name LIKE '%keyword%' OR p.desc LIKE '%keyword%'
I want results that match p.name to be returned first, and second to p.desc.
How can i achieve this?
payling
source share