mysql.Result
generated from ../src/mod_mysql/res.cppKeeps the result of a query.
Constants
Properties
| Name | Type | Description |
|---|---|---|
fieldTell ![]() |
Integer | The current offset of the field cursor. |
numFields ![]() |
Integer | Returns the number of columns in a result set. |
numRows ![]() |
Integer |
Returns the number of rows in the result set.
numRows is intended for use with statements that return a result set, such as SELECT. For statements such as INSERT, UPDATE, or DELETE, the number of affected rows can be obtained with affectedRows. |
Methods
dataSeek
dataSeek(Offset)
| Name | Type | Default | Description |
|---|---|---|---|
| Offset | Integer |
Seeks to an arbitrary row in a query result set. The offset value is a row
number and should be in the range from 0 to numRows.
This function requires that the result set structure contains the entire
result of the query, so dataSeek may be used only in conjunction with
query.
fetchField
fetchField() : Field
Returns the definition of one column of a result. Call this function repeatedly to retrieve information about all columns in the result set. fetchField returns null when no more fields are left.
fetchFieldDirect
fetchFieldDirect(FieldNr) : Field
| Name | Type | Default | Description |
|---|---|---|---|
| FieldNr | Integer | Position of the field, between 0 and (numFields - 1) |
Given a field number FieldNr for a column within a result set, returns that column's field definition as a Field object. You may use this function to retrieve the definition for an arbitrary column
fetchFields
fetchFields() : Array
Returns an array of all fields for a result set. Each element represents one column of the result set. When an error occurs or no fields are found, a null is returned.
fetchLengths
fetchLengths() : Array
Returns an array with integer elements containing the size of each field value. The length for empty columns and for columns containing NULL values is zero. When an error occurs or no fields are found, a null is returned.
fetchObject
fetchObject() : Object
Returns an array with each field value as element. When an error occurs or there are no fields available a null is returned.
fetchRow
fetchRow() : Array
Returns an array with each field value as element. When an error occurs or there are no fields available a null is returned.
next
next() : Integer
This function is used when you execute multiple statements specified as a single statement string,
or when you execute CALL statements, which can return multiple result sets.
If more statement results exist, next() reads the next statement result and returns the status back
to the application. The result object is ready for retrieving the contents.

© 2002 - 2007 Franky Braem.