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 7178101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:51:08+00:00 2026-05-28T16:51:08+00:00

I am trying to create an android app and I have to do the

  • 0

I am trying to create an android app and I have to do the follwoing:

I have two tables bill with barcode and amount columns and table billpayments with barcode and payamount columns.

How can I select from table billpayments amount where barcore = table bill barcode???

This is my code

function getItem1(flatname) {
var total = 0;
var payment = 0;
var previous = 0;
$.mobile.notesdb.transaction(function(t) {
    t.executeSql('SELECT barcode, buildingcode, buildingaddress, flatname, flatdescription, entryseason, period, amount FROM bill WHERE flatname = ?',
    [flatname],
    function(t, result) {
        var i,
            len = result.rows.length,
            row,
            rowb;


        for (i = 0; i < len; i += 1) {
            row = result.rows.item(i);
            var html = '<input type="checkbox" name="code_'+ i +'" id="code_'+ i +'" value="' + row.amount + '"/><label for="code_'+ i +'">' + row.period +'..........'+ row.amount+'</label></br>';
            $('#Code').append($(html));

            total = total + row.amount;


        function previousPayments() {
            $.mobile.notesdb.transaction(function(t) {
                t.executeSql('SELECT barcode, amount FROM billpayments WHERE barcode=?',[row.barcode],
                    function(t, resultpayment) {
                        var ii,
                            lenb = resultpayment.rows.length,
                            rowb;
                        for (ii = 0; ii < lenb; ii += 1) {
                            var rowb = resultpayment.rows.item(ii);
                            $('#displayflat article').append($('<p>' + rowb.barcode + '</p>'));
                            previous = previous + rowb.amount;
                        }
                    });
            });
        }

        previousPayments();
        $('#displayflat article').append($('<p>' + row.barcode + '</p>'));
        }
  • 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-05-28T16:51:09+00:00Added an answer on May 28, 2026 at 4:51 pm

    Join the tables on the barcode column. http://www.w3schools.com/sql/sql_join.asp this should explain joins. I think you want an inner join (or just join, same thing).

    SELECT column_name(s)
    FROM table_name1         /* billpayments */
    INNER JOIN table_name2   /* bills */
    ON table_name1.column_name=table_name2.column_name
    

    Check out the site to make sure you get exactly what you want.

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

Sidebar

Related Questions

I'm trying to create an app for Android that simply sends a command to
I'm trying to create an Android app that adds a random quote to images.
Hi im trying to create a simple android app using the Eclipse IDE, all
I'm trying to create an Android app that searches for a certain type of
I am trying to create my first Android app and need some help. Basically
I'm trying to create an Android app in Java (using Ubuntu 11.10 with the
I'm trying to create a ListView with items that have two lines of text,
Trying to create an android app with Facebook integration, I've gotten to the part
recently I been trying to create an android app that uses JSON Objects to
I am trying to create an android app that will connect to various web

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.