4 Replies Latest reply on Jul 2, 2009 11:19 AM by rmorgan

    Query Problem

    rmorgan Level 1

      I have been looking at code entirely to long and I keep getting a sql syntax error with the below code. Just wondering if anyone can see anything right off with the query before I go into more detail, I think I need some fresh eyes looking at it. This is being run against a MySQL server. TIA


      select bcastreq.bcast_id, bcastreq.affiliate_id, bcastreq.subject, DATE_FORMAT(bcastreq.reqtimestamp, '%m/%d/%Y') as reqtimestamp, affiliate.affiliatename,  bcastreq.affiliatetype_id, count(editbcastreq.bcast_id) as editcount, editbcastreq.affiliatetype_id
      from bcastreq
      left join editbcastreq
      on bcastreq.bcast_id = editbcastreq.bcast_id
      left join affiliate
      on bcastreq.affiliate_id = affiliate.affiliate_id
      group by bcastreq.bcast_id
      <cfif Arguments.filtercolumn NEQ "" AND Arguments.filter NEQ "">
      where #Arguments.filtercolumn# like '#Arguments.filter#%'
      <cfif Arguments.gridsortcolumn NEQ "">
      order by #Arguments.gridsortcolumn# #Arguments.gridsortdirection#