MySQLQuery
class MySQLQuery extends Query (View source)
A result-set from a MySQL database (using MySQLiConnector) Note that this class is only used for the results of non-prepared statements
Properties
protected | mixed | $handle | The internal MySQL handle that points to the result set. |
|
protected | $columns | Metadata about the columns of this query |
Methods
Return an array containing all the values from a specific column. If no column is set, then the first will be returned
Return an array containing all values in the leftmost column, where the keys are the same as the values.
Hook the result-set given into a Query class, suitable for use by SilverStripe.
Details
in
Query at line 41
array
column(string $column = null)
Return an array containing all the values from a specific column. If no column is set, then the first will be returned
in
Query at line 62
array
keyedColumn()
Return an array containing all values in the leftmost column, where the keys are the same as the values.
in
Query at line 78
array
map()
Return a map from the first column to the second column.
in
Query at line 94
array
record()
Returns the first record in the result
in
Query at line 104
string
value()
Returns the first column of the first record.
in
Query at line 118
string
table()
Return an HTML table containing the full result-set
Traversable
getIterator()
Return the next record in the query result.
int
numRecords()
Return the total number of items in the query result.
__construct(MySQLiConnector $database, mixed $handle)
Hook the result-set given into a Query class, suitable for use by SilverStripe.
__destruct()
No description
void
rewind()
Rewind to the first row