Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: bind variables with array

by hakkr (Chaplain)
on Jun 08, 2004 at 11:27 UTC ( [id://362282]=note: print w/replies, xml ) Need Help??


in reply to Re: bind variables with array
in thread bind variables with array

Thanks yes that was just a rough example , I found my problem !! If you call execute(()); that is with a blank array you get an error so I had to put in a check to prevent it getting called when no placeholders are passed in
my $res = (defined @$vars) ? $sth->execute(@$vars) : $sth->execute;

Thanks for the pointer to the docs looks like execute(@) justs calls bind_param() for each value in the array so it does work.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://362282]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-24 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found