I'm sure this is an easy questions and I'm just doing something stupid but I'm really new to all this code.
I'm trying to run a sqlite query in flex to count the total number of records
I believe its working fine but I just can't figure out how to display the results - all I get back is [object Object].
private function overviewOne():void{
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConn;
stmt.text = "SELECT COUNT(user_id) FROM tbl_user WHERE status_status ='Away'";
stmt.execute();
var result:SQLResult = stmt.getResult();
acoverviewOne = new Array(result.data);
trace (result.data[0]);
}
Thanks thats helpful.
Here's what I'm getting back.
So how do I make a reference to the COUNT(user_id)?
(flash.data::SQLResult)#0
complete = true
data = (Array)#1
[0] (Object)#2
COUNT(user_id) = 8
lastInsertRowID = 0
rowsAffected = 0