perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kee Hinckley <naz...@somewhere.com>
Subject Re: DBIx::Recordset -> Search filtering
Date Fri, 13 Dec 2002 23:45:53 GMT
At 4:08 PM -0600 12/13/02, Carlos Kassab wrote:
>Hi:
>
>I know i can do this kind of filtering with DBI::recordset:
>http://localhost/recordset1.epl?year=2002;month=10
>
>But can i do some more complicated filtering as in a select sentence?
>
>select name from agenda where name like 'caro%'

Sure.

$agenda->Search({
	'$fields' => 'name',
	'name'	  => 'caro%',
	'*name'	  => 'like'
     });

The *name sets the operator for the condition.

Or you can do it in more raw form:

$agenda->Search({
	'$fields' => 'name',
	'$where'	=> 'name like ?',
	'$values'	=> ['caro%'],
    });
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message