Gossamer Forum
Home : General : Internet Technologies :

Re: [Andy] Good sorting algorithm...

Quote Reply
Re: [Andy] Good sorting algorithm... In reply to
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 Unimpressed

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 Unsure 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!
Subject Author Views Date
Thread Good sorting algorithm... Andy 6558 Feb 6, 2003, 4:13 AM
Thread Re: [Andy] Good sorting algorithm...
Paul 6215 Feb 6, 2003, 4:15 AM
Thread Re: [Paul] Good sorting algorithm...
Andy 6243 Feb 6, 2003, 4:20 AM
Thread Re: [Andy] Good sorting algorithm...
Andy 6191 Feb 6, 2003, 5:01 AM
Thread Re: [Andy] Good sorting algorithm...
Paul 6145 Feb 6, 2003, 7:54 AM
Thread Re: [Paul] Good sorting algorithm...
Andy 6187 Feb 6, 2003, 8:05 AM
Thread Re: [Andy] Good sorting algorithm...
Paul 6143 Feb 6, 2003, 9:05 AM
Post Re: [Paul] Good sorting algorithm...
Andy 6149 Feb 6, 2003, 9:24 AM