Returns a struct having all the columns as keys and their corresponding values.
queryGetRow( query, rowNumber );
→ returns struct
someQuery.getRow(rowNumber)
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}
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.