airwolf
Posts: 563
Joined: 7/13/2009 From: teh interwebs Status: offline
|
You're going to have to create a custom SQL query. The function you'll need to use is DATEDIFF. I can't give you precise code, because the asset data table numbers are totally dependent upon the way you've setup assets in your KBOX. The following assumes ASSET_DATA_1 is the proper table for your Domains (which it won't be, because the first 5 or so are builtin to each KBOX - yours may be ASSET_DATA_5, ASSET_DATA_9, etc... depending on how many asset types you have) and the field number for the domain expiration date is FIELD_1 (which also won't be true, you'll have to figure this out). Your domain expiration date field also needs to be in the format 'YYYY-MM-DD HH:MM:SS'.
SELECT * FROM ASSET A
JOIN ASSET_DATA_1 AD ON (A.ASSET_DATA_ID = AD.ID)
WHERE DATEDIFF(AD.FIELD_1,NOW()) < 30
To find table and field numbers, use the MySQL Query Browser tool.
_____________________________
Andy Flesner, MCSA - Flesner.com author.programmer.serveradmin.gamer Follow Me on Twitter
|