Wraps database result set functionality.
Gets results from PDO and turns them into arrays.
Works with statements and queries.
This also means that can use things like count() as PDO
doesn't always automatically return a recordset count.
Also allows a different return modes.
package | dstruct_common |
---|---|
todo | Gives a count of 1 when returns just an empty array?! |
__construct(object $result, integer $mode)
$mode is one of PDO::FETCH_xx constants, and defaults to returning an associative array.
object
PDO::Statement handle or PDO::Query result
integer
Array return mode. PDO::FETCH_xx constant.
count() : integer
integer
getMode() : integer
Mode is PDO::FETCH_xx constant
integer
num_rows() : integer
Sort-of mimics mysqli
integer
$mode : integer
$rs : array
$total : integer