src/Mysql.php
public function getAllRows(
        array $arrWhat = ['*'], 
        array $arrWhere = [], 
        array $arrOrder = ['`id` ASC'], 
        array $arrLimit = []
    ) : array
    {
        if (count($arrWhat) < 1) {
            throw new Exception('Missing MySQL Select Params');
        }
        $strWhere = "";
        $strOrder = "";
        $strLimit = "";
        
        if (count($arrWhere) > 0) {
            $strWhere = "WHERE ".implode(" AND ", $arrWhere)." ";
        }
        
        if (count($arrOrder) > 0) {
            $strOrder = "ORDER BY ".implode(", ", $arrOrder)." ";
        }
        
        if (count($arrLimit) > 0) {
            $strLimit = "LIMIT ".implode(",", $arrLimit)." ";
        }
        
        $what = "`".implode($arrWhat, "`,`")."`";
        $sql = "SELECT ".$what." "
            . "FROM `".$this->tableName."` "
            . $strWhere
            . $strOrder
            . $strLimit
            ;
        //echo $sql;
        $stmt = $this->db->query($sql);
        $arrRows = $stmt->fetchAll(PDO::FETCH_ASSOC);
        if ($arrRows === false) {
            throw new Exception('failed to execute '.$sql);
        }
        return $arrRows;
    }
public function getAllRows(
        array $arrWhat = ['*'], 
        array $arrWhere = [], 
        array $arrOrder = ['`id` ASC'], 
        array $arrLimit = []
    ) : array
    {
        if (count($arrWhat) < 1) {
            throw new Exception('Missing MySQL Select Params');
        }
        $strWhere = "";
        $strOrder = "";
        $strLimit = "";
        
        if (count($arrWhere) > 0) {
            $strWhere = "WHERE ".implode(" AND ", $arrWhere)." ";
        }
        
        if (count($arrOrder) > 0) {
            $strOrder = "ORDER BY ".implode(", ", $arrOrder)." ";
        }
        
        if (count($arrLimit) > 0) {
            $strLimit = "LIMIT ".implode(",", $arrLimit)." ";
        }
        
        $what = "`".implode($arrWhat, "`,`")."`";
        $sql = "SELECT ".$what." "
            . "FROM `".$this->tableName."` "
            . $strWhere
            . $strOrder
            . $strLimit
            ;
        //echo $sql;
        $stmt = $this->db->query($sql);
        $arrRows = $stmt->fetchAll(PDO::FETCH_ASSOC);
        if ($arrRows === false) {
            throw new Exception('failed to execute '.$sql);
        }
        return $arrRows;
    }
public function getAllRows ( array $ arrWhat = [ '*' ] , array $ arrWhere = [ ] , array $ arrOrder = [ '`id` ASC' ] , array $ arrLimit = [ ] ) : array { if ( count ( $ arrWhat ) < 1 ) { throw new Exception ( 'Missing MySQL Select Params' ) ; } $ strWhere = "" ; $ strOrder = "" ; $ strLimit = "" ; if ( count ( $ arrWhere ) > 0 ) { $ strWhere = "WHERE " . implode ( " AND " , $ arrWhere ) . " " ; } if ( count ( $ arrOrder ) > 0 ) { $ strOrder = "ORDER BY " . implode ( ", " , $ arrOrder ) . " " ; } if ( count ( $ arrLimit ) > 0 ) { $ strLimit = "LIMIT " . implode ( "," , $ arrLimit ) . " " ; } $ what = "`" . implode ( $ arrWhat , "`,`" ) . "`" ; $ sql = "SELECT " . $ what . " " . "FROM `" . $ this -> tableName . "` " . $ strWhere . $ strOrder . $ strLimit ; //echo $sql; $ stmt = $ this -> db -> query ( $ sql ) ; $ arrRows = $ stmt -> fetchAll ( PDO :: FETCH_ASSOC ) ; if ( $ arrRows === false ) { throw new Exception ( 'failed to execute ' . $ sql ) ; } return $ arrRows ; }
Simple SELECT Query, no transactions, fetch multiple entries

@param array $arrWhat
@param array $arrWhere array of strings Example: "`name` LIKE 'Dave'"
@param array $arrOrder
@param array $arrLimit
@return array
@throws Exception
Simple SELECT Query no transactions fetch multiple entries