public static function merge()
    {
        $args = func_get_args();
        $where = array();
        $options = array();
        foreach ($args as $o) {
            $options = array_merge($options, $o);
            if (isset($o['where'])) {
                if (count($where) === 0) {
                    $where = $o['where'];
                } else {
                    foreach ($o['where'] as $oc) {
                        $matches = 0;
                        foreach ($where as $wc) {
                            if ($oc == $wc) {
                                $matches += 1;
                            }
                        }
                        if ($matches === 0) {
                            $where[] = $oc;
                        }
                    }
                }
            }
        }
        $options['where'] = $where;
        return $options;
    }