Well i currently want to do a search engine with SQL and PHP. I crrently use the following query:
SELECT * FROM info WHERE name LIKE '%$q%' LIMIT 10
But i want to select the info with 'name' that start with $q, not the ones that cointain $q.
Simply remove the first wildcard (%):
SELECT * FROM info WHERE name LIKE 'X%' LIMIT 10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With