0
我正在使用下面的函数来执行SQL,它工作正常,当不需要返回,但如果我做一个查询,如“SELECT * FROM table
”,那么它不会返回任何东西。该功能是:如何获得返回SQLite Javascript数据库的函数?
function executeSQL(query)
{
return db.transaction(function(q)
{
return q.executeSql(query, null,
function (q, results)
{
debug(results);
return results;
},
function (q, error)
{
debug(error);
}
);
});
}
我打电话的方式是:
results = executeSQL('SELECT * FROM `table`');