src/Util/PDOX.php
function allRowsDie($sql, $arr=FALSE, $error_log=TRUE) {
        $stmt = self::queryDie($sql, $arr, $error_log);
        $rows = array();
        while ( $row = $stmt->fetch(\PDO::FETCH_ASSOC) ) {
            array_push($rows, $row);
        }
        return $rows;
    }
function allRowsDie($sql, $arr=FALSE, $error_log=TRUE) {
        $stmt = self::queryDie($sql, $arr, $error_log);
        $rows = array();
        while ( $row = $stmt->fetch(\PDO::FETCH_ASSOC) ) {
            array_push($rows, $row);
        }
        return $rows;
    }
function allRowsDie ( $ sql , $ arr = FALSE , $ error_log = TRUE ) { $ stmt = self :: queryDie ( $ sql , $ arr , $ error_log ) ; $ rows = array ( ) ; while ( $ row = $ stmt -> fetch ( \ PDO :: FETCH_ASSOC ) ) { array_push ( $ rows , $ row ) ; } return $ rows ; }
Prepare and execute an SQL query and retrieve all the rows as an array

While this might seem like a bad idea, the coding style for Tsugi is
to make every query a paged query with a limited number of records to
be retrieved to in most cases, it is quite reasonable to retrieve
10-30 rows into an array.

If code wants to stream the results of a query, they should do their
own query and loop through the rows in their own code.

@param $sql The SQL to execute in a string.  If the SQL is badly formed this function will die.
@param $arr An optional array of the substitition values if needed by the query
@param $error_log Indicates whether or not errors are to be logged. Default is TRUE.
@return array This is either the rows that were retrieved or or an empty array
if there were no rows.
Prepare and execute an SQL query and retrieve all the rows as an array