This is an alternative way of working with the query. Convenient to use when the query returns a single record.
This function should not be used together with fetchAssoc or fetchNumeric.
Syntax
value( fieldname or index )
Arguments
A fieldname or index.
Return value
Value.
Example1
dynamic rs = DB.Query("select * from Cars where id=20");
MVCFunctions.Echo(rs.value("Make"));
Example2
dynamic rs = DB.Query("select count(*) from Cars");
MVCFunctions.Echo(rs.value(0));
See also:
•QueryResult object: fetchNumeric()
•QueryResult object: fetchAssoc()