in reply to Re^2: SQL::Statement limit clause with placeholders
in thread SQL::Statement limit clause with placeholders

The immediate solution is to dynamically generate the SQL. This could be as simple as:
my $sql = <<__END_SQL__; YOUR STATEMENT HERE __END_SQL__ $sql .= "LIMIT $start, $chunk_size\n"; my $sth = $dbh->prepare( $sql ); # etc.

  • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
  • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"

Replies are listed 'Best First'.
Re^4: SQL::Statement limit clause with placeholders
by springm (Novice) on Jun 03, 2005 at 14:37 UTC
    Ok. Looks reasonable.

    Untainting offset und limit (coming from query params) via regex should be safe then.

    Thanks for the help!