I use an SQL database with car information in combination with a great WordPress Plugin that outputs dynamic tables with the data.
The plugin also offers nice filter functions via Dropdowns that filter the content according to column values - however I struggle with one problem.
One column of the database includes the date range in which the specific car was built (e.g. 2012 - 2016). So I have many cars with different date ranges that often overlap. Therefore I have many duplicates when I open this Dropdown.
For instance:
2012 - 2016
2012 - 2018
2013 - 2014
2013 - 2017
and so on...
I want the user to be able to select from a variety of single years (e.g. 2014,2015,2016...). If a year is chosen via Dropdown (e.g. 2014), all the rows that match this range need to be shown (so for instance also the example from above where 2012 - 2016 is also a match because 2014 is within this range.
I wrote to the developer and he told me to use strings but I have no clue how to do that.
The plugin offers a possibility to fetch the data from the SQL table via $get
.
I would really be happy if someone helped me with this problem.