Version: current

# Class MySQLQuery

A result-set from a MySQL database.

  SS_Query implements Iterator
  MySQLQuery

Package: sapphire\model
Located at sapphire/core/model/MySQLDatabase.php

## Methods summary

`public` | # `__construct( `MySQLDatabase` $database, handle $handle )` Hook the result-set given into a Query class, suitable for use by sapphire. Hook the result-set given into a Query class, suitable for use by sapphire. #### Parameters $database database The database object that created this query. $handle handle the internal mysql handle that is points to the resultset.
`public` | # `__destroy( )`
`public array` | # `seek( integer $row )` Go to a specific row number in the query result and return the record. Go to a specific row number in the query result and return the record. #### Parameters $row int $rowNum Tow number to go to. #### Returns `array` array
`public integer` | # `numRecords( )` Return the total number of items in the query result. Return the total number of items in the query result. #### Returns `integer` int
`public array` | # `nextRecord( )` Return the next record in the query result. Return the next record in the query result. #### Returns `array` array

### Methods inherited from SS_Query

`column()`, `current()`, `first()`, `key()`, `keyedColumn()`, `map()`, `next()`, `record()`, `rewind()`, `table()`, `valid()`, `value()`

### Magic methods summary

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -