On Fri, 10 Aug 2012 17:08:07 -0400 Rudolf Lippan <rlip...@remotelinux.com> wrote:
> On Friday, August 10, 2012 at 03:30:16 PM, Seven Reeds wrote: > > $tmp = <<EOF; > > SELECT > > UPPER(eS.machine) AS Machine, > > UPPER(eS.netID) AS NetID, > > DATE_FORMAT(eS.date, '%Y/%m/%d %H:%i:%S') AS Start, > > IF (eE.date IS NULL, > > '', > > DATE_FORMAT(eE.date, ''%Y/%m/%d %H:%i:%S')) AS End, > ^^^^^^ > ... > > > ideas? > > > > > Unless I am missing something, it looks like your SQL is broken. Specifically, the doubled-up single-quote before the date format string. I think your caret pointers ended up a little off. With the doubled-up quote, the quoting through the rest of the query gets inverted--meaning your question marks all end up inside quotes, and aren't recognized as placeholders. It would be great if that would trigger a syntax error.... but the checking for that probably doesn't happen until later, when execute is called. -- C. Chad Wallace, B.Sc. The Lodging Company http://www.lodgingcompany.com/ OpenPGP Public Key ID: 0x262208A0