0
테이블 번호가 subjects
인 콘솔 번호에 로그 할 수있는 다음 코드가 있습니다. 테이블의 레코드 수 얻기
db = openDatabase("myDatabase", "1.0", "", 200000);
db.transaction(function(tx) {
tx.executeSql("SELECT COUNT(*) AS nor FROM subjects", [],
function(result){
console.log(result.rows);
},
function(tx, error){
tx.executeSql("CREATE TABLE subjects (id REAL UNIQUE, name TEXT)");
}
);
});
실제로
result.rows
은 미정 로깅, 그래서 심지어에있어서
item(int index)
호출 할 수있다. 반환 된 레코드 수에 어떻게 액세스 할 수 있습니까?