> the tricky part is I could have fifteen rows in the db all with
> different start and end dates that I need to check each day against.
Then do the data comparison in the DB --
SELECT * FROM your_table
WHERE {$check_time} >= start_time
AND {$check_time} <= end_tim
: [PHP] Re: best way to do this with arrays...
> $start = '2004-07-04';
> $end = '2004-07-09';
> $check = '2004-07-06'; // the date you want to check
>
> $timestampStart =
> mktime(0,0,0,substr($start,5,2),substr($start,8,2),substr($start,0,4));
> $start = '2004-07-04';
> $end = '2004-07-09';
> $check = '2004-07-06'; // the date you want to check
>
> $timestampStart =
> mktime(0,0,0,substr($start,5,2),substr($start,8,2),substr($start,0,4));
> $timestampEnd =
> mktime(0,0,0,substr($end,5,2),substr($end,8,2),substr($end,0,4));
> $timestampCh
3 matches
Mail list logo