ersaurabh101 Posted March 5, 2017 Share Posted March 5, 2017 (edited) Hii, For local sqlite storage i am following this tutorial - https://tejasrpatel.wordpress.com/2011/12/29/create-sqlite-off-line-database-and-insertupdatedeletedrop-operations-in-sqlite-using-jquery-html5-inputs/ I am using these commands to create a table in my login.html page - var createStatement = "CREATE TABLE IF NOT EXISTS userdetails (username TEXT, password TEXT, company TEXT)"; var db = openDatabase("QuickTask", "1.0", "Quick Task", 200000); // Open SQLite Database function initDatabase() // Function Call When Page is ready. { try { if (!window.openDatabase) // Check browser is supported SQLite or not. { alert('Databases are not supported in this browser.'); } else { createTable(); // If supported then call Function for create table in SQLite } } catch (e) { if (e == 2) { // Version number mismatch. console.log("Invalid database version."); } else { console.log("Unknown error " + e + "."); } return; } } function createTable() // Function for Create Table in SQLite. { db.transaction(function (tx) { tx.executeSql(createStatement, [], showRecords, onError); }); } After succesful login i am directing to welcome.html window.location.href = "welcome.html"; How do i access my tables on this page ? In console i am not finding any tables. I am trying to make an app [will make apk using phonegap] and stuck at the very beginning..Please help / Guide Edited March 5, 2017 by ersaurabh101 Quote Link to comment https://forums.phpfreaks.com/topic/303357-how-to-fetch-sqlite-data-on-another-page/ Share on other sites More sharing options...
dalecosp Posted March 9, 2017 Share Posted March 9, 2017 What's the console saying? Perhaps you could add some more console.log() statements if these aren't firing and giving you any clues. Quote Link to comment https://forums.phpfreaks.com/topic/303357-how-to-fetch-sqlite-data-on-another-page/#findComment-1544002 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.