Gossamer Forum
Home : General : Internet Technologies :

Good sorting algorithm...

Quote Reply
Good sorting algorithm...
Does anyone have a good system for sorting items? I'm working on a wallpaper script, in PHP. I am going to try and add a sorting system, that will show new links to be sorted first, and then order it by hits. I'm trying to think how to structure the code/SQL.

How does LSQL work out if a link is new? I think this is going to be my main problems. The actual query shouldn't be hard. Something like this should do;

SELECT * FROM gallery_Wallpapers WHERE CatID = 5 ORDER BY AddStamp, Downloads

The main problem I'm thinking there is going to be, is working out if AddStamp (contains a UNIX timestamp from NOW()) is equal to 1 week.

Does anyone have some ideas they can throw at me about this? It doesn't matter if the ideas are Perl related...cos it shoudn't be that hard to translate into PHP.

Thanks in advance Smile

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 6570 Feb 6, 2003, 4:13 AM
Thread Re: [Andy] Good sorting algorithm...
Paul 6227 Feb 6, 2003, 4:15 AM
Thread Re: [Paul] Good sorting algorithm...
Andy 6254 Feb 6, 2003, 4:20 AM
Thread Re: [Andy] Good sorting algorithm...
Andy 6202 Feb 6, 2003, 5:01 AM
Thread Re: [Andy] Good sorting algorithm...
Paul 6156 Feb 6, 2003, 7:54 AM
Thread Re: [Paul] Good sorting algorithm...
Andy 6198 Feb 6, 2003, 8:05 AM
Thread Re: [Andy] Good sorting algorithm...
Paul 6154 Feb 6, 2003, 9:05 AM
Post Re: [Paul] Good sorting algorithm...
Andy 6160 Feb 6, 2003, 9:24 AM