Re: [PHP-DB] GROUP BY

2009-08-16 Thread Chris
Ron Piggott wrote: I run a once daily e-mail list. The users are able to choose the time of day they receive their daily e-mail. Their preference is stored in the email-delivery_hour field. I am trying to determine which email_delivery_hour between 0 and 6 has the lowest number of subscriber

[PHP-DB] GROUP BY

2009-08-16 Thread Ron Piggott
I run a once daily e-mail list. The users are able to choose the time of day they receive their daily e-mail. Their preference is stored in the email-delivery_hour field. I am trying to determine which email_delivery_hour between 0 and 6 has the lowest number of subscribers. (I am trying to m

Re: [PHP-DB] DELETE mySQL query

2009-08-16 Thread Phpster
On Aug 16, 2009, at 12:23 AM, "Ron Piggott" wrote: Is there a way to do the math in a DELETE statement (All 1 step; See my "sample" below pseudo code below). I am trying to delete the record if it is more than 3 hours old and the value of "approved" is still 0. DELETE FROM `guest_b