我有一个数据库我想只从当前日期的数据库中选择数据,之后为tommorrows日期
$query = mysql_query("SELECT PatientMaster.PatientFirstName,PatientMaster.PatientLastName,PatientMaster.PatientID,ProviderAppointmentListings.ProviderNPI,ProviderAppointmentListings.AppointmentTime,ProviderAppointmentListings.AppointmentListingsID, '' FROM PatientMaster JOIN ProviderAppointmentListings ON PatientMaster.PatientID = ProviderAppointmentListings.PatientId LIMIT 0, 30");
$rows = array();
while($row = mysql_fetch_assoc($query)) {
$rows[] = $row;
}
echo json_encode($rows);
答案 0 :(得分:1)
WHERE YOUR_DATE_FIELD=CURDATE() or YOUR_DATE_FIELD=CURDATE()+ INTERVAL 1 DAY
答案 1 :(得分:0)
SELECT * FROM tablename TO_DAYS(NOW())和TO_DAYS(NOW())之间的WHERE TO_DAYS(列名)+ 1