ORMExecuteQuery() count seems to return an array

coldfusion, orm

Solution

Try this:

example = ormExecuteQuery("select count(commentID) as n from pComment c", true);

Second argument is known as `unique`, despite it's confusing name it makes exactly what you need: makes function to return single value.

Problem

ORMExecuteQuery() seem to return an array for the following ``` example = ormExecuteQuery("select count(commentID) as n from pComment c"); output uing cfdump for example would be... array [1][x] ``` where x is count. How can I just get n as a number and not an array object returned? I want to just getn()

Original source