questions about bind_param and mysql

questions about bind_param and mysql

am 28.01.2004 03:48:28 von smrtalec

I have a snippet of code below. I'm trying to use teh bind_param option to select multiple rows using a foreach loop. after doign some reading I realized this is supprted through DBD are there any special measures that I need to take to make bind_param work.



## select rows in table based on search strings - only works with or
foreach $search(@search_pat){
my $sth = $dbh->prepare ("SELECT str_no_addr, str_name_addr, cit_addr
FROM s3a_inglewood_project_info
WHERE * LIKE ?;") or err_trap("failed to prepare statement\n");
$sth->bind_param(1,$search);

## exicute and fetch selected rows
$sth->execute or
err_trap("failed to execute statement\n");
}
my $array_ref = $sth->fetchall_arrayref();


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org