Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Invalid Code Highlighted

Explorer ,
Jun 27, 2008 Jun 27, 2008
A genius designed a complex, multi-tabbed online database interface for which I am now responsible for maintenance and upkeep. One tab is having some problems and I want to try to troubleshoot it. I'm working in DreamWeaver and used the 'highlight invalid code' button on the coding toolbar. The cfqueryparams in the attached two cfif statements got highlighted:

Can anybody see any obvious syntax problems?

Thanks,

John
TOPICS
Getting started
353
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 27, 2008 Jun 27, 2008
Yup, I see what it's complaining about. In the cfqueryparam tags under value, he tries to concatenate some fields together and separate them with a blank space. The problem is that he is using double quotes to signify the blank space and to open/close the value field in the tag. Try changing the double quotes that signify a blank space to single quotes. So:

<cfqueryparam value="#form.CHANGE_TICKET_REQ_STRT_TMS_Date & ' ' & form.CHANGE_TICKET_REQ_STRT_TMS_Time & ' ' & form.CHANGE_TICKET_REQ_STRT_TMS_AMPM#" ...>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 01, 2008 Jul 01, 2008
LATEST
Better yet, use date functions to create a datetime variable before you get to your query, and use that variable instead of concatonating strings.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources