SELECT * FROM user WHERE user_id = user_name; (note the lack of quotes),
use array('user_id' => array(false, 'user_name')) to do this.
}
if ( $mode == LIST_AND && is_numeric( $field ) ) {
$list .= "($value)";
- } elseif ( $mode == LIST_AND && is_array ($value) ) {
+ } elseif ( $mode == LIST_AND && is_array ($value) && $value[0] !== false ) {
$list .= $field." IN (".$this->makeList($value).") ";
+ } elseif ( $mode == LIST_AND && is_array ($value) && $value[0] === false ) {
+ $list .= "$field = {$value[1]}";
} else {
if ( $mode == LIST_AND || $mode == LIST_SET ) {
$list .= $field.'=';
}
- $list .= ($mode==LIST_NAMES?$value:$this->addQuotes( $value ));
+ $list .= ($mode == LIST_NAMES ? $value : $this->addQuotes( $value ));
}
}
return $list;