I'd like to improve my MySQL search functionality. When searching "Fi" in my car database, I would like FIAT to be ranked first, as I feel a cars brand should have a higher rank than the model version. I want to tell MySQL if the search term matches the first letters of a Brand then prioritise that result first.
{]1
Here's my current code
$sql = "SELECT v.id, v.model, v.model_version, v.model_year, b.brand FROM vehicles v LEFT JOIN brands b ON v.brand_id = b.id WHERE CONCAT(b.brand, ' ', v.model, ' ', v.model_version) LIKE ? LIMIT 6";