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
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

