msqlFreeResult() to identify the data set to be freed.
msqlFetchRow()
m_row msqlFetchRow ( result )
H
m_result * result ;
The individual database rows returned by a select are accessed via the
msqlFetchRow() function. The data is returned in a variable of type m_row
which contains a char pointer for each field in the row. For example, if a select
statement selected 3 fields from each row returned, the value of the 3 fields
would be assigned to elements [0], [1], and [2] of the variable returned by
msqlFetchRow(). A value of NULL is returned when the end of the data has
been reached. See the example at the end of this sections for further details.
Note, a NULL value is represented as a NULL pointer in the row.
msqlDataSeek()
void msqlDataSeek ( result , pos )
H
m_result * result ;
int pos ;
The m_result structure contains a client side "cursor" that holds information
about the next row of data to be returned to the calling program.
msqlDataSeek() can be used to move the position of the data cursor. If it is
called with a position of 0, the next call to msqlFetchRow() will return the first
row of data returned by the server. The value of pos can be anywhere from 0
(the first row) and the number of rows in the table. If a seek is made past the
end of the table, the next call to msqlFetchRow() will return a NULL.
msqlNumRows()
int msqlNumRows ( result )
H
m_result * result ;
The number of rows returned by a query can be found by calling
msqlNumRows() and passing it the result handle returned by msqlStoreResult().
The number of rows of data sent as a result of the query is returned as an integer
value.
If a select query didn t match any data, msqlNumRows() will indicate that the
result table has 0 rows (note: earlier versions of mSQL returned a NULL result
handle if no data was found. This has been simplified and made more intuitive
by returning a result handle with 0 rows of result data)
<
New Page 1
Godaddy Web Hosting