Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Querying data with and & or when using DBIx::Class

by McA (Priest)
on Sep 17, 2013 at 00:09 UTC ( #1054358=note: print w/replies, xml ) Need Help??

in reply to Querying data with and & or when using DBIx::Class

Replies are listed 'Best First'.
Re^2: Querying data with and & or when using DBIx::Class
by phildeman (Sexton) on Sep 17, 2013 at 12:44 UTC
    Thanks for the links. I actually used a sample script from the DBIx::Class::Manual::Cookbook:

    -and => [ -or => [ color => 'Blue', color => 'Orange', ], ID => 1234 ]

    and I got the following error:

    DBIx::Class::ResultSet::search(): DBI Exception: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND => [ -OR => COLOR => BLUE, COLOR => ORANGE, , ID => 1234, ], ) )

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054358]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-03-30 21:58 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (364 votes). Check out past polls.