Loading MySQL rows starting from a timestamp

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

Post Reply
User avatar
Trenchant
Forum Contributor
Posts: 291
Joined: Mon Nov 29, 2004 6:04 pm
Location: Web Dummy IS

Loading MySQL rows starting from a timestamp

Post by Trenchant »

I'm making a Flash support interface that is backened by php. Inside the support system support staff can chat with eachother.

The problem is I need to select ALL posts that have been made in the shoutbox since the support representative has logged in.

Here is what my timestamp looks like:
20050601184812
(year-4)(month-2)(day-2)(hour-2)(minute-2)(second-2)

I need a mysql query that will select all posts AFTER a given timestamp. Any ideas on how I could do this?

At first I thought something like pagination and searched that up but using a similar technique wouldn't work.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

SELECT * FROM `table` WHERE `time` >= '20050601184812'
User avatar
Trenchant
Forum Contributor
Posts: 291
Joined: Mon Nov 29, 2004 6:04 pm
Location: Web Dummy IS

Post by Trenchant »

Thanks so much for the quick reply.
Post Reply