queryGetRow

Returns a struct having all the columns as keys and their corresponding values.

queryGetRow( query, rowNumber ); → returns struct

Member Function Syntax

someQuery.getRow(rowNumber)

queryGetRow Argument Reference

query query
Required

query object do get data from.

rowNumber numeric
Required

position of the row to be returned.

Examples sample code invoking the queryGetRow function

news = queryNew("id,title",
    "integer,varchar",
    [ {"id":1,"title":"Dewey defeats Truman"}, {"id":2,"title":"Man walks on Moon"} ]);
writeOutput( serializeJSON( queryGetRow(news, 1) ) );

Expected Result: {"title":"Dewey defeats Truman","id":1}

news = queryNew("id,title",
    "integer,varchar",
    [ {"id":1,"title":"Dewey defeats Truman"}, {"id":2,"title":"Man walks on Moon"} ]);
writeOutput( serializeJSON( news.getRow(1) ) );

Expected Result: {"title":"Dewey defeats Truman","id":1}


Fork me on GitHub