Select whith PDO without mappage.

@param string $sql
@param array  $param
176561
public function selectNMPdo($request, $param = null)
    {
        $statement = $this->getAdapter()->query($request, ADT::QUERY_MODE_PREPARE);
        $result = $statement->execute($param);

        $resultSet = new ResultSet();

        return $resultSet->initialize($result);
    }
1212412
protected function query ( $sql )
	{
		$sql = $this->sql_printf(func_get_args());
		if (!($res = mysql_query($sql, $this->conn)))
		{
			$this->sql_errcheck($sql);
		}
		if (is_resource($res))
		{
			mysql_free_result($res);
		}
	}
869927
public function getResults($sql, $params = null)
    {
        $stmt = $this->execute($sql, $params);

        return $stmt->fetchAll(PDO::FETCH_ASSOC);
    }
497909
public function query($sql, $params = null): Database
    {
        $sth          = null;
        $this->values = [];
        $this->lastid = null;
        if ($sql === '') {
            throw new CoreException(
                __CLASS__
                . '::query(): Query was undefined, please make sure you pass one.'
            );
        }

        if ($params === null) {
            try {
                $sth = $this->connection->query($sql);
            } catch (PDOException $e) {
                throw new CoreException(
                    __CLASS__.'::query()->PDO::query() : ' . $e->getMessage()
                );
            }
        } else {
            try {
                $sth = $this->connection->prepare($sql);
            } catch (PDOException $e) {
                throw new CoreException(
                    __CLASS__.'::query()->PDO::prepare() : ' . $e->getMessage()
                );
            }
            try {
                $sth->execute($params);
            } catch (PDOException $e) {
                throw new CoreException(
                    __CLASS__.'::query()->PDO::execute() : ' . $e->getMessage()
                );
            }
        }

        if ($sth instanceof PDOStatement && 0 !== strpos($sql, 'select')) {
            try {
                $this->values = $sth->fetchAll($this->configs['fetch_mode']);
            } catch (PDOException $e) {
                throw new CoreException(
                    __CLASS__.'::query()->PDOStatement::fetchAll() : '
                    . $e->getMessage()
                );
            }
        }

        if (false !== strpos($sql, 'insert')) {
            try {
                $this->lastid = $this->connection->lastInsertId();
            } catch (PDOException $e) {
                throw new CoreException(
                    __CLASS__.'::query()->PDO::lastInsertId() : ' . $e->getMessage()
                );
            }
        }

        return $this;
    }
1122909
public function getColumn($sql, $params = null)
    {
        $stmt = $this->execute($sql, $params);
        $column = [];

        while ($row = $stmt->fetch()) {
            $column[] = $row[0];
        }

        return $column;
    }
380950
public static function exec($sql, $params = [])
    {
        BLLog::log('[SQL] ' . $sql);
        BLLog::log('[Params] ' . var_export($params, true));
        $stmt = self::getHandle()->prepare($sql);
        $stmt->execute($params);
        return $stmt;
    }
1364737
function sql($sql = null, $params = NULL) {
        $params = $this->autoarr($params);
        $sql = str_replace('table.',$this->alias.'.',$sql);
        return $this->execute($sql, $params);
        return $this;
    }
152773
public function query($query,$sqlParams=null)
    {
        $this->query =  (string)$query;
        if ($sqlParams!=null) {
            $this->sqlParams = $sqlParams;
        }
        return $this;
    }
343696
public function unionAllRaw(string $sql, string ...$params)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->unionAllRaw($sql, ...$params);

        return $instance;
    }
1184546
public function pdoQuery($sql = '', $bindWhereParam = [])
    {
        // Check empty query
        if (empty($sql)) {
            self::error('Query is empty..');
        }

        // clean query from white space
        $sql = trim($sql);
        // get operation type
        $operation = explode(' ', $sql);
        // make first word in uppercase
        $operation[0] = strtoupper($operation[0]);

        // set class property with pass value
        $this->sql = $sql;
        // set class statement handler
        $this->STH = $this->prepare($this->sql);

        // check valid sql operation statement
        if (!in_array($operation[0], $this->validOperation)) {
            self::error('invalid operation called in query. use only ' . implode(', ',
                    $this->validOperation) . ' You can have NO SPACE be between ' . implode(', ',
                    $this->validOperation) . ' AND parms');
        }

        // sql query pass with no bind param
        if (count($bindWhereParam) <= 0) {

            // try catch block start
            try {
                // execute pdo statement
                if ($this->STH->execute()) {
                    // get affected rows and set it to class property
                    $this->affectedRows = $this->STH->rowCount();
                    // set pdo result array with class property
                    $this->results = $this->STH->fetchAll();
                    // close pdo cursor
                    $this->STH->closeCursor();
                    // return pdo result
                    return $this;
                } else {
                    self::error($this->STH->errorInfo()); // if not run pdo statement sed error
                }
            } catch (\PDOException $e) {
                self::error($e->getMessage() . ': ' . __LINE__);
            } // end try catch block
        } elseif (count($bindWhereParam) > 0) {  // if query pass with bind param

            $this->data = $bindWhereParam;
            // start binding fields
            // bind pdo param
            $this->_bindPdoParam($bindWhereParam);
            // use try catch block to get pdo error
            try {
                // run pdo statement with bind param
                if ($this->STH->execute()) {
                    // check operation type
                    switch ($operation[0]) {
                        case 'SELECT':
                            // get affected rows by select statement
                            $this->affectedRows = $this->STH->rowCount();
                            // get pdo result array
                            $this->results = $this->STH->fetchAll();
                            // return PDO instance
                            return $this;
                            break;
                        case 'INSERT':
                            // return last insert id
                            $this->lastId = $this->lastInsertId();
                            // return PDO instance
                            return $this;
                            break;
                        case 'UPDATE':
                            // get affected rows
                            $this->affectedRows = $this->STH->rowCount();
                            // return PDO instance
                            return $this;
                            break;
                        case 'DELETE':
                            // get affected rows
                            $this->affectedRows = $this->STH->rowCount();
                            // return PDO instance
                            return $this;
                            break;
                    }
                    // close pdo cursor
                    $this->STH->closeCursor();
                } else {
                    self::error($this->STH->errorInfo());
                }
            } catch (\PDOException $e) {
                self::error($e->getMessage() . ': ' . __LINE__);
            } // end try catch block to get pdo error
        } else {
            self::error('Error Query');
        }
    }
403264
public function select( $request, $query_params = [] )
	{
		if( is_array($request) )
		{
			$template = reset($request);
			$query_params = end($request);
		}
		else if( is_string($request) )
		{
			$template = $request;
		}

		$statement = $this->_query_( $template, $query_params );

		$results = [];
		try {
			$results = $statement->fetchAll( \PDO::FETCH_ASSOC );
		} catch (PDOException $e) {
			if( DB_DEBUG_QUERY )
			{
				debug($e->getMessage());
			} 
			else
			{
				debug('Query Error');
			}
			exit;
		}

		return $results;
	}
252981
public function createCommand($sql = null, $params = [])
    {
        /** @var Command $command */
        $command = new $this->commandClass([
            'db' => $this,
            'sql' => $sql,
        ]);

        return $command->bindValues($params);
    }
1282516
public function selectPdo($select, $param = null)
    {
        if ($this->usePaginator === true) {
            return $this->initPaginator(array($select, $param));
        }
        $this->result = $this->tableGateway->selectPdo($select, $param);

        return $this->result;
    }
740643
public function column(string $sql, array $params = [])
    {
        $prepared = $this->prepare($sql, $params);
        $this->execute($prepared);
        $result = $prepared['statement']->fetchColumn();
        $prepared['statement']->closeCursor();
        return $result;
    }
1277492
public function execute($sql, array $params=array())
	{
		if ($params) {
			$stmt = $this->prepare($sql);
			if (!$stmt) { return false; }

			$flag = $stmt->execute($params);
			if (!$flag) { return false; }
		} else {
			$stmt = $this->query($sql);
			if (!$stmt) { return false; }
		}

		return $stmt->rowCount();
	}
173398
public function builderCount($sql, $params){
        $stmt = $this->driver->query($sql, $params);
        $ret = $stmt->fetch(PDO::FETCH_NUM);
        if ($stmt)
            $stmt->closeCursor();
        $stmt = null;
        if (!$ret || !isset($ret[0])){
            return null;
        }
        return $ret[0];
    }
526642
public static function raw(
        $sql,
        $params = null
    ) {
        $results = static::getDatabase()->getResults($sql, $params);

        return $results;
    }