If you wish to obtain the number of results of a query, you can use the getRowCount method.
From your getData call…
… just replace getData with getRowCount:
This call therefore retrieves 1 piece of information (in the 3 standard formats) indicating the number of rows.
Was this post helpful?