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
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!
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

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!