query.columnData()

Returns all the data in a query for a given column

query.columnData( columnName=string, closure=function )

Returns: Array

Argument Description
columnName
string, required

name of the column returned

closure
function, optional

UDF/Closure that call with the values from column

Alias: function, callback, udf

Examples

q = queryNew( "id,name","int,varchar",[{"id":"1","name":"one"},{"id":"2","name":"two"}]);
dump(q);
writeDump(q.columndata("name"));
writeDump(q.columndata("id"));

See also