ignoring saturday and sunday
Posted
by bsandrabr
on Stack Overflow
See other posts from Stack Overflow
or by bsandrabr
Published on 2010-03-20T23:04:23Z
Indexed on
2010/03/20
23:11 UTC
Read the original article
Hit count: 328
mysql-query
|date
I am pulling in all the records from my customer database(mysql) for the last ten days
$offset1 =strtotime("-10 day");
$date3=date("Y-m-d",$offset1);
SELECT * FROM customers WHERE date between '$date3' and '$date' AND customer.custid = '$custid' ORDER by date DESC
I would like to leave out the dates falling on a saturday or sunday and would like to put this in my query rather than the php
If you can help thanks
© Stack Overflow or respective owner