note
Ranna
Or, if you're not stuck on using just <code>$dbh->selectall_arrayref</code> and your database supports placeholders, couldn' you do this?<br>
<code>
$sth = $dbh->prepare("SELECT " . '? ' x $#selector . "FROM people WHERE (fornavn LIKE '%$search%') or (eternavn LIKE '%$search%') or (cpr LIKE '%$search%'", \%attr); #dunno if you can do the \%attr part...
$sth->execute(@selector);
</code>
And then you've got a statement handle to get your data from.. I don't know if it's more efficient, but it seems a bit more readable to me.
120473
120474