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.
objectPDO::Statement handle or PDO::Query result
integerArray return mode. PDO::FETCH_xx constant.
count() : integer
integergetMode() : integer
Mode is PDO::FETCH_xx constant
integernum_rows() : integer
Sort-of mimics mysqli
integer$mode : integer
$rs : array
$total : integer