I'm using Multidatespicker so I have dates in my database as follow:
ID POST KEY VALUE
1 1 multipledates 20151020, 20151015, 20151101
2 2 multipledates 20151103
3 3 multipledates 20151022, 20151010, 20151202, 20160410
...
Then I have 'date_start' and 'date_end'. I need to select dates between this dates.
This SQL query only works in my example with ID2 (because it hasn't commas)
SELECT ... BETWEEN $date_start AND $date_end
The solution would be to use something like 'LIKE' but not if possible:
SELECT ... BETWEEN LIKE '%$date_start%' AND LIKE '%$date_end%'
Any ideas?
Thanks.