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

  • SEARCH
  • Home
  • 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 9005061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:03:04+00:00 2026-06-16T01:03:04+00:00

I am trying to develop an android mobile application using the PhoneGap framework, and

  • 0

I am trying to develop an android mobile application using the PhoneGap framework, and I want to synchronize my table of local database(of my phone) to the server database.

this is my code, but this code allow me to send only one line of table how can i send all line of table.

$.ajax({
        type: 'POST',
        data: col1+'&lid='+col2,
        url: 'http://your-domain.com/comments/save.php',
        success: function(data){
            console.log(data);
            alert('Your data was successfully added');
        },
        error: function(){
            console.log(data);
            alert('There was an error adding your data');
        }
    });
  • 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-16T01:03:05+00:00Added an answer on June 16, 2026 at 1:03 am

    sorry for my miss understoods…

    If you are using phonegap i guess you are using the Storage feature: http://docs.phonegap.com/en/2.2.0/cordova_storage_storage.md.html#Storage

    folowing one of theirs examples, you can do something like:

    function queryDB(tx) {
        tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
    }
    
    function querySuccess(tx, results) {
    
        //do you ajax request....
        ...
        data: {
            rows : results.rows
        }
        ...
    }
    
    function errorCB(err) {
        alert("Error processing SQL: "+err.code);
    }
    
    var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
    db.transaction(queryDB, errorCB);
    

    other option is to send a simple array…

    function querySuccess(tx, results) {
    
      var myRowsIds = [];
    
    
      var len = results.rows.length;
            for (var i=0; i<len; i++){
                myRowsIds .push( results.rows.item(i).id )
            }
    
            //do you ajax request....
            ...
            data: {
                    rows : myRowsIds
                }
            ...
        }
    

    hope it helps!

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

Sidebar

Related Questions

I'm trying to develop an Audio Capture application using the AudioRecord class from android
I'm trying to develop an application on phonegap on Android. What I'm trying to
i am trying to develop a security application on Android and i want to
Currently i'm trying to develop a mobile app for the Android devices (using Appcelerator).
I'm trying to develop a pc application(mainly for microsoft windows) to provide mobile phone
I’m trying to develop an Android application for a medical device using Bluetooth (SPP).
I'm trying to develop an android application that uses network connection. The server is
I'm trying to develop a mobile application for some site, that using HTML form
I am trying to develop a android application where I want to show product
I am currently using Mono for Android to develop a mobile application. I have

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.