I know this question was already answered. But I hope someone can help me in my specific Problem.
I have a custom Post Type. For this Post Type the user can declare 1 to X Datetime ranges with a value which is valid for this daterange.
At this time I store these Ranges in one serialized database field.
But now I need to do a sql - query to get all Posts which have valid dates in a given daterange. So e.g. "Select all Posts where the valid Daterange is between 07.12.2015 and 01.01.2016"
At this Time i only use the given wordpress tables to store the data. (Because I often read, that create own tables is not the best practice in wordpress) But now I think it is the best way to create a "post date position"-Table with the fields "post id", "position id", "from date", "to date", "value" to store these informations and can query them easily.
My question now is, is there any better way to solve this problem or is creating a own table the best practice?
Thanks