selecting the most recent

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
buddok
Forum Commoner
Posts: 50
Joined: Tue May 25, 2004 2:44 pm

Post by buddok »

isnt there a way you can just select the most recent or the second most recent ? that wud solve all my problems :(
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Hmm I don't think there is any way of determining most recent/non recent records in the database without any kind of resource such as the timestamp I was talking about! All in all it would take 10mins to setup.
User avatar
buddok
Forum Commoner
Posts: 50
Joined: Tue May 25, 2004 2:44 pm

Post by buddok »

but do i put that script in each box ?
User avatar
buddok
Forum Commoner
Posts: 50
Joined: Tue May 25, 2004 2:44 pm

Post by buddok »

cus i dont think that wud work :S
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

No I shouldn't think so, depending on your original coding structure I suppose.
User avatar
buddok
Forum Commoner
Posts: 50
Joined: Tue May 25, 2004 2:44 pm

Post by buddok »

but i think you forgetting i put that code in each of the four boxes does that effect wat u said ?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Am I right in saying that these boxes are individual sections which hold the news?
User avatar
buddok
Forum Commoner
Posts: 50
Joined: Tue May 25, 2004 2:44 pm

Post by buddok »

yer so you get why its all messed an weird to do now lol ? :P
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Well instead of using individual boxes for each 'news box' use a loop and pack it all into one, or is it possible with your original code? :D
User avatar
buddok
Forum Commoner
Posts: 50
Joined: Tue May 25, 2004 2:44 pm

Post by buddok »

yer i cud do that i was jus tryin to make it original lol then realised it was real hard to achieve i suppose ill jus have to leave it borin i guess :(
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Well, like I said you should seriously reconsider packing all of these 'news boxes' into one big box!. :D I can guarantee it would help you alot.
User avatar
buddok
Forum Commoner
Posts: 50
Joined: Tue May 25, 2004 2:44 pm

Post by buddok »

rofl yer but thats why i did it i thought it would be a challenge :P
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Yeah a challenge, now your pulling your hair out, hehe. Always look for the best solutions first :D
User avatar
buddok
Forum Commoner
Posts: 50
Joined: Tue May 25, 2004 2:44 pm

Post by buddok »

yer lol anyways thansk alot for tryin :)
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Yeah no problem ;)
Post Reply