Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Database API > QueryResult object

QueryResult object: fetchNumeric()

Scroll Prev Next More

 

The fetchNumeric() function returns the record as an array with numeric keys: 0 => value, 1=>value.

Syntax

fetchNumeric()

Arguments

No arguments.

Return value

Returns the record as an array with numeric keys: 0 => value, 1=>value.

 

Null, if there are no more records.

Example

dynamic record;
dynamic rs = DB.Query("select * from carsmake");
while(record = rs.fetchNumeric())
{
MVCFunctions.Echo(record[0]);
MVCFunctions.Echo(record[1]);
}

See also:

Database API: Query()

QueryResult object: fetchAssoc()

QueryResult object: value()

Database API: Exec()

Database API: Select()

Database API: PrepareSQL()

Using SQL variables

About Database API