The vB Geek

Go Back   The vB Geek > vB Geek Products > Geek Article and Review System

Geek Article and Review System GARS is the mega popular system for turning forums into articles, tutorials, or even reviews.

Advertisement
  Learn how to remove ads

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-03-2006, 09:05 AM
Marris Marris is offline
Junior Member
 
Join Date: Feb 2006
Posts: 23
Geek Article and Review System License Holder 
Question MySQL queries sort/search on GARS custom variables?

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.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing custom fields in vbulletin search results stckhlm Geek Article and Review System 1 09-30-2008 06:06 PM
Gars causing high queries ? miyukichii Geek Article and Review System 8 03-04-2008 04:40 PM
Search Articles by first letter and custom fields Praetorian Geek Article and Review System 1 05-13-2007 12:48 PM
Sort by custom fields Ramses Geek Article and Review System 4 04-18-2007 04:01 PM
Custom Variables outside of Article display ? Zate Geek Article and Review System 4 02-06-2006 07:08 PM


All times are GMT. The time now is 08:12 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.