Hi,

I have a code like:

my $rs = $c->model("Db::Forum")->search({
id_room => 1,
},
{
join => "id_user",
prefetch => "id_user",
rows => 20,
order_by => 'date desc, time desc',
page => 1,
});

I want to add some conditions to this query like:

id_user => $id_user,

How can I add these conditions after defining $rs?

For example I want to add them based on some other conditions like

if ($id_user) {
#Add the condition id_user => $id_user,
}

Thank you.

Octavian


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to