in reply to Re^3: SQL LIKE and Binding Variables
in thread SQL LIKE and Binding Variables

Right. I understand about needing a placeholder for each value. I know how to do it with most other SQL operators, such as IN:

# could be any number of artists my @vals =("Artist1", "Artist2") # And now I build the SQL statement with placeholders based on values my $sql = 'SELECT * FROM Songs WHERE Songs.Artist IN (' .join (", ", m +ap {"?"} @vals) .')';

What's got me stumped is the syntax do do something like the .join (", ", map {"?"} @vals) . part of the statement, when using a LIKE operator and wrapping it % wildcards.

Thanks again for your help.