As a follow-up, I went back to my code where I built this using dbi
mysql and did a trace on it. Surprisingly, it sees this as the same
thing but it handles it better. Here is the trace output of the mysql
version.It sees the last field as a \n character.
So is there a better way to format my sql where dbi doesn't try to
tack on that extra ')?
here is my sql statement
my $sql = "INSERT into $table ($fields) values ($places)";
Thanks,
Brian
DBI 1.32-ithread dispatch trace level set to 5
-> prepare for DBD::mysql::db (DBI::db=HASH(0x845196c)~0x84518a0
'INSERT into queue_stats (qdate, qtime, callid, queue, exten, q
event, qholdtime, qcalltime, qorigposition) values (?, ?, ?, ?, ?, ?,
?, ?, ?)') thr#804bd00
New DBI::st (for DBD::mysql::st, parent=DBI::db=HASH(0x84518a0), id=)
dbih_setup_handle(DBI::st=HASH(0x8451a74)=>DBI::st=HASH(0x84565a8),
DBD::mysql::st, 8451a80, Null!)
dbih_make_com(DBI::db=HASH(0x84518a0), DBD::mysql::st, 208) thr#804bd00
dbih_setup_attrib(DBI::st=HASH(0x84565a8), Err,
DBI::db=HASH(0x84518a0)) SCALAR(0x8064aec) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x84565a8), State,
DBI::db=HASH(0x84518a0)) SCALAR(0x813ed98) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x84565a8), Errstr,
DBI::db=HASH(0x84518a0)) SCALAR(0x8064b04) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x84565a8), Debug,
DBI::db=HASH(0x84518a0)) 0 (already defined)
dbih_setup_attrib(DBI::st=HASH(0x84565a8), FetchHashKeyName,
DBI::db=HASH(0x84518a0)) 'NAME' (already defined)
dbih_setup_attrib(DBI::st=HASH(0x84565a8), HandleError,
DBI::db=HASH(0x84518a0)) undef (not defined)
Setting mysql_use_result to 0
<- prepare= DBI::st=HASH(0x8451a74) at ./brians.pl line 62 via
./brians.pl line 37
-> execute for DBD::mysql::st (DBI::st=HASH(0x8451a74)~0x84565a8
'2004-11-24' '22:43:25' '1101336017.254' 'brianroy' 'NONE' 'COM
PLETECALLER' '1' '1' '187
') thr#804bd00
-> dbd_st_execute for 084586a4
Binding parameters: INSERT into queue_stats (qdate, qtime,
callid, queue, exten, qevent, qholdtime, qcalltime, qorigposition)
values ('2004-11-24', '22:43:25', '1101336017.254', 'brianroy',
'NONE', 'COMPLETECALLER', '1', '1', '187\n')