Ask a Question related to Coldfusion Database Access, Design and Development.
-
PackinDaMAC #1
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>
:cool;:confused;
PackinDaMAC Guest
-
FH 9 issues
Can you add a border to a photo in FH9 once it's inserted into a project...or do you have to go back to the original in another app (FW 4) and add... -
[PHP-DEV] ZTS issues
From: Michael Sisolak Here's the updated patch for that stuff http://www.ctindustries.net/patches/zts-php5-20031120.diff.txt Also fixes an... -
[PHP-DEV] ZTS issues
> I have been looking at the IIS isapi issues and came up with the Rob, I've done some work in the past on ISAPI threading issues (although I... -
Issues with ER between IDS 9.30 UC5 and IDS 9.30 TC6
There should not be any issues. hariog@yahoo.com (Hari Gupta) wrote in message news:<1a1cd35b.0310281500.6a03359f@posting.google.com>... -
XP PRO has WEP issues
Kerby Krien wrote: Disable Wireless Zero Configuration service. Enter the WEP passcode and key cyphers manually. Q -
PackinDaMAC #2
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>
:cool;:confused;
PackinDaMAC Guest
-
PackinDaMAC #3
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>
:cool;:confused;
PackinDaMAC Guest
-
jdeline #4
Re: Querey Issues
You need to check to see if Now( ) + 2 is a Saturday or Sunday and set ydate
accordingly. See below.
<CFSET foo = DayOfWeek(Now())>
<CFIF foo IS 1>
<cfset ydate = DateFormat(DateAdd("d", +4 Now()), "MM/DD/YYYY")>
<CFELSEIF foo IS 7>
<cfset ydate = DateFormat(DateAdd("d", +3, Now()), "MM/DD/YYYY")>
<CFELSE>
<cfset ydate = DateFormat(DateAdd("d", +2, Now()), "MM/DD/YYYY")>
</CFIF>
jdeline Guest
-
PackinDaMAC #5
Re: Querey Issues
I need to check and see if it is Sat Sun or Friday.....This should work right
but it says i have an invalid cfml construct i dont know whyy thought....
<cfset tdate = DayOfWeek(Now())>
<cfif tdate IS 1>
<cfset ydate = DateFormat(DateAdd("d", +2 Now()), "MM/DD/YYYY")> My error
comes here
<cfelseif tdate IS 7>
<cfset ydate = DateFormat(DateAdd("d", +2 Now()), "MM/DD/YYYY")>
<cfelseif tdate IS 6>
<cfset ydate = DateFormat(DateAdd("d", +3 Now()), "MM/DD/YYYY")>
<cfelse>
<cfset ydate = DateFormat(DateAdd("d", +2, Now()), "MM/DD/YYYY")>
</cfif>Text<cfset ydate = DateFormat(DateAdd("d", +2 Now()), "MM/DD/YYYY")>
PackinDaMAC Guest
-
jdeline #6
Re: Querey Issues
You are missing a comma after the 2
<cfset ydate = DateFormat(DateAdd("d", +2 Now()), "MM/DD/YYYY")>
Same problem on two others, also.
jdeline Guest



Reply With Quote

