public static function select(
        $fields = array('*'),
        $where = array(),
        $order = array(),
        $limitStart = null,
        $limitEnd = null,
        $pdoFetchMode = null
    )
    {
        // validate model PHP structure if necessary
        static::_validateModel();

        // build and execute query
        $mysqlQuery = static::buildSelectQuery($fields, $where, $order, $limitStart, $limitEnd);
        $query      = static::$_dataSource->prepare($mysqlQuery->buildQuery());
        $query->execute($mysqlQuery->getWhereParamsValues());

        // check for mysql error
        $errorcode = $query->errorInfo();
        if ($errorcode[0] != "00000") {
            throw new Exception($errorcode[2]);
        }

        // if no fetch mode specified fallback to FETCH_ASSOC
        if ($pdoFetchMode === null) {
            $pdoFetchMode = \PDO::FETCH_ASSOC;
        }

        // if limit say its a findOne only fetch
        if ($limitStart == 1 && ($limitEnd === null || $limitEnd === 1)) {
            return $query->fetch($pdoFetchMode);
        }

        // fetch and return data from database
        return $query->fetchAll($pdoFetchMode);
    }