Answered
Querey Issues
I have a Querey that select patients based upon there
appointment being two days ahead of today..which means it selects
all patients appointment two days ahead..But when it is friday it
will select patients for sunday but there are none, so it needs to
select the patients for Monday...I was wondering how can i do this
do i have to add another querey or should i just change the one i
have to something eles........kinda lost
<cfset ydate = DateFormat(DateAdd("d", +2, Now()), "MM/DD/YYYY")>
<cfset tdate = DayOfWeek(Now())>
<cfquery datasource="bashful_emoi" name="res">
Select * From Patients where doc_code ='RA' and date_seen LIKE '%#ydate#' Order By last_name ASC
</cfquery>
<table border=0 cellspacing=0 cellpadding="4px" align="center">
<tr>
<td height="15px" background="topline.gif" class="lefttopbottom"><b><center>Name</center></b></td>
<td height="15px" background="topline.gif" class="topbottom"><b><center>Appointment Date</center></b></td>
<td height="15px" background="topline.gif" class="toprightbottom"><b><center>Provider</center></b></td>
<td height="15px" background="topline.gif" class="toprightbottom"><b><center>Location</center></b></td>
</tr>
<cfoutput query="res">
<tr>
<td class="leftrightbottom">#res.last_name# , #res.first_name#</td>
<td align="center" class="rightbottom">#res.date_seen#</td>
<td aligm="center" class="rightbottom"><select><option></option><option>Ramig DPM , David L</option><option>Nicely DPM, Lisa</option><option>Greenberg DPM , Marc S</option></select></td>
<td align="center" class="rightbottom"><input type="text" size="20"></td>
</cfoutput>
</table>
</body>
</html>

<cfset ydate = DateFormat(DateAdd("d", +2, Now()), "MM/DD/YYYY")>
<cfset tdate = DayOfWeek(Now())>
<cfquery datasource="bashful_emoi" name="res">
Select * From Patients where doc_code ='RA' and date_seen LIKE '%#ydate#' Order By last_name ASC
</cfquery>
<table border=0 cellspacing=0 cellpadding="4px" align="center">
<tr>
<td height="15px" background="topline.gif" class="lefttopbottom"><b><center>Name</center></b></td>
<td height="15px" background="topline.gif" class="topbottom"><b><center>Appointment Date</center></b></td>
<td height="15px" background="topline.gif" class="toprightbottom"><b><center>Provider</center></b></td>
<td height="15px" background="topline.gif" class="toprightbottom"><b><center>Location</center></b></td>
</tr>
<cfoutput query="res">
<tr>
<td class="leftrightbottom">#res.last_name# , #res.first_name#</td>
<td align="center" class="rightbottom">#res.date_seen#</td>
<td aligm="center" class="rightbottom"><select><option></option><option>Ramig DPM , David L</option><option>Nicely DPM, Lisa</option><option>Greenberg DPM , Marc S</option></select></td>
<td align="center" class="rightbottom"><input type="text" size="20"></td>
</cfoutput>
</table>
</body>
</html>
