MySQL INTERVAL Mins -
I'm trying to get all the records that use this query
$ Min = 60 * 2 SELECT COUNT as the total number, from job_id to tlb_stats WHERE log_time & gt; = DATE_SUB (CURRENT_DATE, INTERVAL $ min MINUTE) GROUP by job_id
This only selects Recent Records and old ones when I log_time and lt; = If I change, he only chooses the old and leaves what is new.
What am I doing?
Try
$ min = 60 * 2 SELECT COUNT ( `Id`) Where` tlb_stats` is `log_time '& lt; as` total`, `job_id`; Use brackets to quote the field (words like "total" and "id" can be a few days
NOW () < / Code> is used only for 2010-08-04
& lt;
Comments
Post a Comment