$query="select a.*, r.roomname, p.firstname, p.lastname from receipt_month a, room r, person p ";
$query.="where (a.receiptdate between '$date1' and '$date2') and a.status=1 ";
$query.="and a.roomid=r.roomid and a.personid=p.id order by a.receiptdate";
และใน Mysql Database ก็จะเก็บค่าเป็นแบบ Date รูปแบบ 0000-00-00
อ่ะ คนอื่นมีอะไรดีๆ มาต่อเร้ว
Date :
31 ต.ค. 2550 22:07:23
By :
dekcom
No. 2
Guest
$sql = "select * from tbl_helpdesk where wDueDate BETWEEN '$week_start' AND '$week_finish' ";
คุณเอา single quote ของ $week_start และ$week_finish ออกครับ
$sql = "select * from tbl_helpdesk where wDueDate BETWEEN $week_start AND $week_finish ";