> -----Original Message-----
> From: jason corbett [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 06, 2004 5:44 PM
> To: perl beginners
> Subject: Using binding in order to pass values to a sql statement.
> 
> 
> Hello all. I am trying to use bind_param to create a list of 
> values in the form of an array. Then I want to query the data 
> base using a basic sql statement where each value in my list 
> (array) will be sent to the DBI in order to return a value. I 
> am getting and error that says can't call method "bind_param" 
> on defined value at line *&&. Here in the subroutine that 
> will attempt to do this.
>  
>  
>  
> sub kill_porq{
> my @banlist=qw(
> 222497190
> 291529832
> 285471249
> 280768305
> 276573798
> 278628710
> 297888281
> 297002394
> 271831939
> 127465
> 245710698
> 314086723
> 347803890
> 253926979
> 226200204
> 250702348
> 246597179
> 301791980
> 332270292
> 344909948
> 283580543
> 325838931
> 349835609
> 248436566
> 240499101
> 245185000
> 353432496
> 246334241
> 279430907
> 222800122
> );
>  my $ban='';
>  foreach $ban (@banlist){
>  
>  
>  $sth->bind_param (1, "$ban");
> 
>  
>  $sth=$dbh->prepare("select request_no, ban, request_sts, 
> 

Binding should come after preparing ...

José.


**** DISCLAIMER ****

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to