update a
set IsExpired = 0
from table a
where IsExpired = 1 and ExpireDate > GetDate()
Date :
2009-07-17 13:31:48
By :
taobsd
No. 4
Guest
Code (PHP)
Code (SQL)
SELECT * from seat_booking a,payment b,bus_allocate c,student d,route_detail e,bus h where (DATEDIFF(NOW(),a.start_seat)>=2 and Ticket_id=1) and (a.Seat_id=b.Seat_id) and Status_payment=0 and (a.St_id=c.St_id) and (a.St_id=d.St_id) and (c.Point_id=e.Point_id) and (c.Bus_id=h.Bus_id)group by a.St_id