Im running into another strange thing im not use to with MySQL.
If im doing an UPDATE on a record i have to add logic to DateTime Fields.
<CFQUERY datasource="foo" name="insert">
UPDATE JOBINFO
SET TICKETSTATUS = '#FORM.TICKETSTATUS#',
DUEDATE = <CFIF FORM.DUEDATE IS
"">'#FORM.DUEDATE#',<CFELSE>#FORM.DUEDATE#,</CFIF>
JOBNUM = #FORM.JOBNUM#,
PONUMBER = '#FORM.PONUMBER#'
WHERE JOBID = #FORM.JOBID#
</CFQUERY>
If the Variable for the DateTime Field is left blank then i have to
surround the Variable with single quotes. IF the variable is given a value
then i cant use the single quotes.
Am i doing something wrong, or is this the way it has to be with MySql
DateTime fields?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists