j4mie / paris

A lightweight Active Record implementation for PHP5, built on top of Idiorm.
http://j4mie.github.com/idiormandparis/
996 stars 131 forks source link

Where clause with array param #58

Closed lalop closed 11 years ago

lalop commented 11 years ago

I think that can be a good thing to permit make one single call to the where method for multiple conditions. Something like that :

public function where($column_name, $value = null) {
    if(is_array($column_name)){
        $self = $this;
        foreach($column_name as $key=>$value){
            $self = $self->where_equal($key, $value);
        }
        return $self;
    } else {
        return $this->where_equal($column_name, $value);
    }
}
treffynnon commented 11 years ago

Thank you for reporting this issue. Unfortunately this code looks like part of Idiorm and not Paris. Please could you open a ticket there instead.

lalop commented 11 years ago

oooh, yes sorry