FAQ
Hi!
Is it possible to bind an array in code like below? Binding simple variables
works perfectly...

@myArray = (1,2,3);

my $superSchema = [$c->model('myApp::mySuperSchema')->search (
{},
{
bind => [ @myArray, $number]
}
) ];

I'm using query like that in my schema mySuperSchema.pm:

SELECT column_id, number FROM table
WHERE column_id IN (?) AND number != ?

Now I get an error:
"Cannot bind unknown placeholder 3"

So is it matter of '?' in SQL query or I should specify bind parameter in
different way?

Regards
Jakub Tutaj


--
View this message in context: http://www.nabble.com/How-to-bind-an-array-using-my-own-schema-tp23526664p23526664.html
Sent from the Catalyst Web Framework mailing list archive at Nabble.com.

Search Discussions

  • Hans Dieter Pearcey at May 13, 2009 at 6:19 pm

    On Wed, May 13, 2009 at 11:10:01AM -0700, Jakub Tutaj wrote:
    Is it possible to bind an array in code like below? Binding simple variables
    works perfectly...
    You meant to ask this question on the dbix-class mailing list; there isn't any
    Catalyst-related content here.

    hdp.
  • Tomas Doran at May 13, 2009 at 6:20 pm

    Jakub Tutaj wrote:
    Hi!
    Is it possible to bind an array in code like below? Binding simple variables
    works perfectly...
    You appear to have posted to the wrong list.

    You want the DBIx::Class list, this has nothing to do with Catalyst.

    Thanks
    t0m

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedMay 13, '09 at 6:10p
activeMay 13, '09 at 6:20p
posts3
users3
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase