I wasnt sure how to title this question.
I have a database of suppliers, a simplified version is shown below.
Company | Vehicles |
---|---|
X | ["Van", "Luton", "Artic"] |
Y | ["Van", "Luton", "Rigid"] |
Z | ["Luton", "Rigid", "Artic"] |
A | ["Flatbed", "Hiab", "Artic"] |
I am looking for a way to write a query which will pull items based on the vehicle I am searching for...
I have a page where I can select a vehicle type from the a dropdown and the intention is to populate a table to show which companies have this vehicle but the way that it is saved to the DB ["x", "y", "z"]
is trippig me up slightly as I cant seem to use
SELECT * From Table WHERE Vehicle = "input"
Is there a way that I should write the query so that it can filter words from the vehicle string?