I would like to be able to output a list of the next 10 upcoming titles in my GARS database, based on and ordered by my custom date field.
Looking at the database, it appears that custom variables are not actually stored in their own MySQL fields, but together in one field with all the other fields from modules used on the page.
If my custom date field was in it's own field like other vB date fields, it would be straightforward to select and order the items based on date.
Right now, the only method that I can imagine to do this is to parse all the custom1 fields by looking through each entry for a unique string sequence preceeding the date, extract the date and then build a temporary new array to be able to sort and select relevant items.
Is this the best/only way to run queries and sort on a custom field? Or is there a way to make a custom GARS field that only has my custom date information and no other module data, so I can run a direct MySQL query? (To avoid substring extraction and building a temporary sorting array.)
Example custom field database entry:
Code:
a:8:{s:17:"custom_header_url";s:47:"http://www.site.com/forums/forumdisplay.php?f=9";s:8:"datesimp";s:10:"11/23/2004";i:26;s:19:"link1
link2
link3";i:25;a:1:{s:7:"custom1";a:1:{s:17:"custom_header_url";s:47:"http://www.site.com/forums/forumdisplay.php?f=9";}}i:41;a:1:{s:8:"datesimp";i:1101186000;}i:28;N;i:16;N;i:17;N;}
This is the relevant data I want to use to select and sort (this will be different for each item):
1101186000
Any advice is appreciated.