2012-04-09 16 views
-2

とデートする方法現在の日付用のMySQLデータベースからデータを選択し、tommorrowsは、日付の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); 
+1

あなたがここで求めていることはまったく明確ではありません。質問をより明確に述べてください。 – McGarnagle

+0

現在の日付と明日の日付を意味しますか? – selo

+0

は1つのquerryを意味します。現在の日付を希望し、他のものはtommorrows dateを希望します。 –

答えて

1
WHERE YOUR_DATE_FIELD=CURDATE() or YOUR_DATE_FIELD=CURDATE()+ INTERVAL 1 DAY 
0

SELECT * FROM tablename TO_DAYS(NOW())とTO_DAYS(NOW())の間のTO_DAYS(columnname)+ 1

関連する問題