Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8353209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:11:27+00:00 2026-06-09T09:11:27+00:00

How to create two or more tables in phonegap storage database? It works good

  • 0

How to create two or more tables in phonegap storage database? It works good with one table,but if you try to create another one it return Error processing SQL:1; (

  var db = window.openDatabase("Database", "1.0", "Order database", 1000000);
  document.addEventListener("deviceready", onDeviceReady, false);


function onDeviceReady() {
    db.transaction(populateDB, errorCB, successCB);
}




function populateDB(tx) {

    tx.executeSql('DROP TABLE IF EXISTS ORDER');
    tx.executeSql('CREATE TABLE IF NOT EXISTS ORDER (id INTEGER PRIMARY KEY, status)');
    tx.executeSql('INSERT INTO ORDER (id, status) VALUES (1, "new" )');
    tx.executeSql('INSERT INTO ORDER (id, status) VALUES (2, "done" )');
    tx.executeSql('INSERT INTO ORDER (id, status) VALUES (3, "new" )');
    tx.executeSql('INSERT INTO ORDER (id, status) VALUES (4, "undone" )');


    tx.executeSql('DROP TABLE IF EXISTS CLIENT');
    tx.executeSql('CREATE TABLE IF NOT EXISTS CLIENT (id INTEGER PRIMARY KEY, name, addr, mail, phone)');
    tx.executeSql('INSERT INTO CLIENT (id, name, addr, mail, phone) VALUES (1, "Kentavr", "Kiev", "Kentavr@i.ua", "044-454-34-34")');
    tx.executeSql('INSERT INTO CLIENT  (id, name, addr, mail, phone) VALUES (2, "ООО New Step ", "Kiev", "Newstep@i.ua", "044-433-222-24")');
    tx.executeSql('INSERT INTO CLIENT  (id, name, addr, mail, phone) VALUES (3, "NEXT", "Lvov", "next@i.ua", "033-1-3434-24")');
    tx.executeSql('INSERT INTO CLIENT  (id, name, addr, mail, phone) VALUES (4, "Briz", "Lvov", "brizxt@i.ua", "033-1-1111-24")'); 
    tx.executeSql('INSERT INTO CLIENT  (id, name, addr, mail, phone) VALUES (5, "Brand", "Lvov", "brhjjt@i.ua", "033-1-1001-24")'); 




}


function queryDB(tx) {
      tx.executeSql('SELECT * FROM CLIENT WHERE addr="Lvov" ', [], querySuccess, errorCB);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:11:29+00:00Added an answer on June 9, 2026 at 9:11 am

    You can’t create table ORDER, because it’s a part of SQL command 🙂 Rename your table and your programm will work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a database schema with a parent table and two or more child tables.
I have two mysql tables: Item containing items that one can buy: CREATE TABLE
Create two tables with some ids overlapping. create table outer_table ( id integer, overlap_in
i create two input text fields , one for title and another for permanent
I'm trying to shard my database into two: one for my main objects, another
I have two tables (MYISAM) create table A (email varchar(50)); create table B( email
If I have two tables such as this: CREATE TABLE #table1 (id INT, name
There are two tables - posts and comments: create table posts ( id integer
I have two tables and I'm looking for the rows in one table where
Previously I had only one table (I have more, ofc, but these are the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.