Show/Hide Toolbars

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

ASPRunnerPro32x32     ASPRunnerPro manual


value( fieldname or index )

Scroll Prev Next More

 

This is an alternative way of working with the query. Covenient to use when the query only returns a single record.

This function should not be used together with fetchAssoc or fetchNumeric.

Syntax

value( fieldname or index )

Arguments

fieldname or index

Return value

value

Example

set rs = DB_Query("select * from Cars where id=20")

ResponseWrite ArrayElement(rs,"make")

 

set rs = DB_Query("select  count(*) from Cars");

ResponseWrite ArrayElement(rs,0)