Abstract Search question

[prev] [thread] [next] [Date index for 2004/12/21]

From: Andrew Hartford
Subject: Abstract Search question
Date: 23:13 on 21 Dec 2004
I've got a question about the SQL::Abstract where format used by 
Class::DBI::AbstractSearch. I hope this isn't too out of place here.

I'm trying to construct a where clause with the following logic: 
 WHERE A = ? and (B = ? or C = ?).

I can't figure out a way to express this, I hope someone here can help. I 
didn't find much discussion on perlmonks or CDBI wiki or CDBI mailing list 
archives. 

The only way I can figure out how to do this horribly abuses the "modified 
operator" mechanism.

use SQL::Abstract;
$sql = new SQL::Abstract;
print $sql->where( { A => 1, '' => [ { 'B =' => 1 }, { 'C =' => 1 } ] } );

It seems like this shouldn't be so hard.

Thanks!
Andy

(message missing)

Abstract Search question
Andrew Hartford 23:13 on 21 Dec 2004

Re: Abstract Search question
Peter Speltz 07:22 on 22 Dec 2004

Re: Abstract Search question
Peter Speltz 07:41 on 22 Dec 2004

Re: Abstract Search question
Andrew Hartford 15:16 on 22 Dec 2004

Re: Abstract Search question
Andrew Hartford 18:46 on 22 Dec 2004

Re: Abstract Search question
Peter Speltz 18:56 on 22 Dec 2004

Re: Abstract Search question
Andrew Hartford 15:21 on 23 Dec 2004

Re: Abstract Search question
Tim Bunce 16:39 on 23 Dec 2004

Generated at 12:15 on 16 Jan 2005 by mariachi v0.52