Time different PHP/MYSQL
I am trying to figure out how to do the following
I want to get the last 3 entries in the database
get the time, then i need to find out if all 3 of them have been added in the last 3minutes.
If anyone can help that would be great.
What stage are you at right now?
The limit is optional of course, you could easily pull everything from that range and see how many rows you got in total. Or you could leave the date functionality out and just pull the last three rows, and check their timestamps. Or you could always do the date arithmetic on the PHP side too... and you could... well there's almost 50 or so options for how to do this. I think Salathe is on the right track, where are you at with it?
I have the MYSQL set up.
The goal is to make sure the issuer does not bombard the system and request MP3 files. over and over again.
they access the files via the same page http://www.example.com/ad.php
and the ad.php file returns the current ad for that station.
The station is only allowed to play a max of 3 ads in 3 minutes.
Each ad is 30seconds long.
Hope that helps
|All times are GMT. The time now is 02:22 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0