Question
MySql DateAdd
i have the code below which displays a diary of time, next to
each time i need to diplay fisrtname.
i am having a problem with the dateadd function on this line, how do i need to format that for MySql
SELECT PlayerFirstName, PlayerSurname, DiaryWith, DiaryTime AS StartTime,
DATE_ADD('DiaryTime',INTERVAL Duration MINUTE) AS EndTime
i am using mysql and my diarytime is in MySQL TIME format
then i have a QofQ with getevents.starttime = MySQL TIME format
and getevents.EndTime = MySQL Time format
<cfset steptime = getevents.starttime>
<cfloop condition="DateCompare(StepTime, getevents.EndTime) LT 1">
<cfquery name="GetAppointment" dbtype="query">
SELECT PlayerFirstName, PlayerSurname, DiaryWith
FROM GetClients
WHERE StartTime <= <cfqueryparam value="#steptime#" cfsqltype="CF_SQL_TIMESTAMP">
AND EndTime >= <cfqueryparam value="#steptime#" cfsqltype="CF_SQL_TIMESTAMP">
</cfquery>
i am having a problem with the dateadd function on this line, how do i need to format that for MySql
SELECT PlayerFirstName, PlayerSurname, DiaryWith, DiaryTime AS StartTime,
DATE_ADD('DiaryTime',INTERVAL Duration MINUTE) AS EndTime
i am using mysql and my diarytime is in MySQL TIME format
then i have a QofQ with getevents.starttime = MySQL TIME format
and getevents.EndTime = MySQL Time format
<cfset steptime = getevents.starttime>
<cfloop condition="DateCompare(StepTime, getevents.EndTime) LT 1">
<cfquery name="GetAppointment" dbtype="query">
SELECT PlayerFirstName, PlayerSurname, DiaryWith
FROM GetClients
WHERE StartTime <= <cfqueryparam value="#steptime#" cfsqltype="CF_SQL_TIMESTAMP">
AND EndTime >= <cfqueryparam value="#steptime#" cfsqltype="CF_SQL_TIMESTAMP">
</cfquery>
