私は何が欠けていますか?Inspector ウィンドウにデータベースが表示されますが、テーブルがありません。コンソールでテーブルを作成すると表示されますが、自動的には表示されません。
openDatabase 呼び出しは次のとおりです。
<script>var newdb = openDatabase('db2', '1.00', 'DB1', (100 * 1024 * 1024));
テーブルが存在しない場合にテーブルを作成する呼び出しは次のとおりです。
newdb.transaction(function (tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS LOGS (id unique, log)');
tx.executeSql('CREATE TABLE IF NOT EXISTS OBSERVATIONS (observation_id unique, field_id, observation_date, phase_id, magnitude_id, summary)');
tx.executeSql('INSERT INTO LOGS (id, log) VALUES (1, "Test Field 1")');
tx.executeSql('INSERT INTO LOGS (id, log) VALUES (2, "Test Field 2")');
tx.executeSql('INSERT INTO LOGS (id, log) VALUES (4, "Test Field 3")');
tx.executeSql('INSERT INTO OBSERVATIONS (observation_id, field_id, observation_date, phase_id, magnitude_id, summary, plant_no) VALUES (1, 1, "1/1/2012", 1234, 5678, "This is Observation 1", 100)');
tx.executeSql('INSERT INTO OBSERVATIONS (observation_id, field_id, observation_date, phase_id, magnitude_id, summary, plant_no) VALUES (2, 1, "1/2/2012", 1234, 5679, "This is Observation 2", 101)');
});