in reply to Quote mark in string messing up mySQL INSERT
Placeholders. Definately placeholders. You won't have to worry about quoting then because it happens automatically (or even for some cases it saves a step or two internally)
sub insertAttribute { my ($serverID, $featureID, $value) = @_; my $sqlINS = q{ INSERT INTO attribute VALUES (?, ?, ?) }; $dbh->do ( $sqlINS, undef, $serverID, $featureID, $value ); }
Update: BTW I said exactly this yesterday Re^2: Strange experiences w/ perl 5.6.0 on linux 2.2.16-22
__SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Quote mark in string messing up mySQL INSERT
by hmerrill (Friar) on Dec 12, 2002 at 13:53 UTC | |
Re^2: Quote mark in string messing up mySQL INSERT
by tadman (Prior) on Dec 12, 2002 at 15:18 UTC | |
by paulbort (Hermit) on Dec 12, 2002 at 16:22 UTC | |
by mpeppler (Vicar) on Dec 12, 2002 at 20:18 UTC |