Ok..I managed to get this sorted by using the getdate() function in PHP, then grabbing the day of the year, and then minusing 7, to give the new number date. Then its just a case of running the SQL queries...
Anyway..I don't seem to be able to think straight today
I'm trying to figure out how I will get it to work with multiple pages.... the reason I am envisaging a problem, is because of the ORDER BY statement. I currently have;
SELECT * FROM Wallpapers WHERE CatID = $catID ORDER BY isNew, Downloads.
I'm passing the following variables into the script;
page_num = page number
i.e;
wallpapers.php?page_num=3&catID=1
Has anyone got any ideas on how to order these links, whilst preserving the 'isNew' and 'download' statement I'm off to my lunch break now....hopefully I'll be able to think straight after :|
Thanks in advance.
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Anyway..I don't seem to be able to think straight today
I'm trying to figure out how I will get it to work with multiple pages.... the reason I am envisaging a problem, is because of the ORDER BY statement. I currently have;
SELECT * FROM Wallpapers WHERE CatID = $catID ORDER BY isNew, Downloads.
I'm passing the following variables into the script;
page_num = page number
i.e;
wallpapers.php?page_num=3&catID=1
Has anyone got any ideas on how to order these links, whilst preserving the 'isNew' and 'download' statement I'm off to my lunch break now....hopefully I'll be able to think straight after :|
Thanks in advance.
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!