Re: quote problem and mysql

2005-08-04 Thread Todd W
"Andrew Kennard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all > > >my $Vals; >for ( my $i=1;$i<=32;$i++ ) { >$Vals.='?,'; >} >chop $Vals; Ugh. $vals = join(', ', ('?') x 32 ); Ideally, you should have your data in an array, then: my $sql = "IN

Re: quote problem and mysql

2005-07-18 Thread Andrew Kennard
Thanks to you both for your replies GenMainRecData did indeed contain a feature that produced this result ! Regards Andrew "Wiggins d'Anconia" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bob Showalter wrote: >> Andrew Kennard wrote: >> > > [snip] > >> >> No, you shouldn't

Re: quote problem and mysql

2005-07-15 Thread Wiggins d'Anconia
Bob Showalter wrote: > Andrew Kennard wrote: > [snip] > > No, you shouldn't have to do that. Your first approach is correct, so we > need to find out what's going wrong there... > Can you show us GenMainRecData? Are you sure it isn't the culprit here, possibly it is already doing data mungin

RE: quote problem and mysql

2005-07-15 Thread Bob Showalter
Andrew Kennard wrote: > Hi all > > Done lots of googling but this simple thing still has me stumped > > The perl code to insert stuff into an mysql table is this > > my $Vals; > for ( my $i=1;$i<=32;$i++ ) { > $Vals.='?,'; > } Hmm, that seems like it would give you an extra

quote problem and mysql

2005-07-15 Thread Andrew Kennard
Hi all Done lots of googling but this simple thing still has me stumped The perl code to insert stuff into an mysql table is this my $Vals; for ( my $i=1;$i<=32;$i++ ) { $Vals.='?,'; } chop $Vals; my @TheRecord=&GenMainRecData(); my $sth = $dbh->prepare("INSERT IN