On 11 Feb 2008, at 10:31, Peter Sørensen wrote:

DELETE FROM authorized_users WHERE ( ( ( policy = ? ) AND ( email = ?
) ) ): 'policy1', 'IN([EMAIL PROTECTED],[EMAIL PROTECTED] )'

That should delete the entry from authorized_users where
policy = 'policy1'
AND
email = 'IN([EMAIL PROTECTED],[EMAIL PROTECTED] )' (ie literal string)

which you can probably see is not quite what you intended...

I think you want something like:-

if ( @{ $diff->deleted } ) {
    my @del_list;
    foreach my $val ( @{ $diff->deleted } ) {
        push( @del_list, $val );
    }

    my $result_set =
$c->model('DLDB::Model::CatalystModelName::AuthorizedUsers')- >search(
        {
            -and => [
                { 'policy' => $data->{policy} },
                { 'email'  => { -in => [EMAIL PROTECTED] } }
            ]
        }
      )->delete;
}

    Nigel.
--
[ Nigel Metheringham           [EMAIL PROTECTED] ]
[ - Comments in this message are my own and not ITO opinion/policy - ]


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]

Reply via email to