Help for this page

Select Code to Download


  1. or download this
    my @sources = ( 'artist 1', 'artist 2', 'whatever' );  ### we make an 
    +array first...
    my @values = map { s/([_%])/\\$1/g; "%$_%" } @sources;  ### ...to avoi
    +d an error here
    ...
    
    my $sth = $dbh->prepare( "SELECT * FROM Songs where ($like_clause)" );
    $sth->execute( @values );