Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: DBI execute() args in array format (or similar) possible?

by chromatic (Archbishop)
on Aug 12, 2002 at 22:16 UTC ( [id://189656]=note: print w/replies, xml ) Need Help??


in reply to DBI execute() args in array format (or similar) possible?

I tried to call the function with a join() attempting to join @args with commas effectively turning the args into a scalar separated by commas but I couldn't fool the execute command this way.

I've been thinking about this for the past five minutes (waiting on another database), and I cannot find any way where this makes sense to me. If you need four arguments, why would you expect that gyrating to pass only one argument would work? (My best guess is that you see a similarity between "1, 2, 3" and (1, 2, 3) where, semantically, none exists.)

I'm willing to bet that a judicious use of split would solve your problem. I'll even give you two better diagnostics to prove that @args doesn't contain what you think it contains:

local $" = ')('; print "Results contains: ", scalar( @args ), " elements:\n"; print "(@args)\n";

Update: Replaced @results with @args, as it should have been from the start.

Replies are listed 'Best First'.
Re: Re: DBI execute() args in array format (or similar) possible?
by snafu (Chaplain) on Aug 12, 2002 at 22:29 UTC
    I'm not really concerned about @results right now. Im only concerned with what I send $STH->execute()

    Perhaps we are having a miscommunication?

    _ _ _ _ _ _ _ _ _ _
    - Jim
    Insert clever comment here...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-26 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found