From: Domas Mituzas Date: Mon, 4 Oct 2004 19:43:49 +0000 (+0000) Subject: Database::makeList() now checks in LIST_AND mode if supplied list item X-Git-Tag: 1.5.0alpha1~1661 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=d54c3602df3be8d99f4fee35b299de662f79822c;p=lhc%2Fweb%2Fwiklou.git Database::makeList() now checks in LIST_AND mode if supplied list item value is an array, and uses IN (x,y,...). This extends select() syntax as well, as arrays can be specified for conditions. --- diff --git a/includes/Database.php b/includes/Database.php index c908196033..e0f534caee 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -808,6 +808,8 @@ class Database { } if ( $mode == LIST_AND && is_numeric( $field ) ) { $list .= "($value)"; + } elseif ( $mode == LIST_AND && is_array ($value) ) { + $list .= $field." IN (".$this->makeList($value).") "; } else { if ( $mode == LIST_AND || $mode == LIST_SET ) { $list .= $field.'=';