sub make_insert_func { my @PLACEHOLDERS = ('?') x @_; local $" = ','; my $SQL = "INSERT (@_) INTO foo VALUES (@PLACEHOLDERS)"; return sub { my $dbh = shift || return; my $sth = $dbh->prepare($SQL); $sth->execute(@_); $sth->finish; } }
Makeshifts last the longest.
In reply to Re^3: Fast Building of SQL Statements
by Aristotle
in thread Fast Building of SQL Statements
by hardburn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |