Exemple #1
0
        if ($select == '') {
            return new Object(-1, "Invalid query");
        }
        $select = 'SELECT ' . $select;
        $from = $query->getFromString($with_values);
        if ($from == '') {
            return new Object(-1, "Invalid query");
        }
        $from = ' FROM ' . $from;
        $where = $query->getWhereString($with_values);
        if ($where != '') {
            $where = ' WHERE ' . $where;
        }
        $groupBy = $query->getGroupByString();
        if ($groupBy != '') {
            $groupBy = ' GROUP BY ' . $groupBy;
        }
        $orderBy = $query->getOrderByString();
        if ($orderBy != '') {
            $orderBy = ' ORDER BY ' . $orderBy;
        }
        $limit = $query->getLimitString();
        if ($limit != '') {
            $limit = sprintf(' LIMIT %d, %d', $start_count, $list_count);
        }
        return $select . ' ' . $from . ' ' . $where . ' ' . $groupBy . ' ' . $orderBy . ' ' . $limit;
    }
}
DBMysql::$isSupported = function_exists('mysql_connect');
/* End of file DBMysql.class.php */
/* Location: ./classes/db/DBMysql.class.php */