How to solve this query in database using sqlite phone gap
am facing a problem in recent days. The problem is database. In fact, I create the mane database 'casepad '. Then I created a table because the database 'table of cases' have (ID, name, date). Now I insert the value on this table. When inserting I also create a name ("casename") .mean table if I insert the value of the case table (1, 'AB', 2/13). Then I create table AB. Now I need to get the value of the case table (I am) but I need to count the number of items in another table (AB). Here, I had to try it.
function onDeviceReady() { db = window.openDatabase("Casepad", "1.0", "Casepad", 200000); db.transaction(getallTableData, errorCB); } function insertData() { db.transaction(createTable, errorCB, afterSuccessTableCreation); } //createtableandinsertsome record function createTable(tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS CaseTable (id INTEGER PRIMARY KEY AUTOINCREMENT, CaseName TEXT unique NOT NULL ,CaseDate INTEGER ,TextArea TEXT NOT NULL)'); tx.executeSql('INSERT OR IGNORE INTO CaseTable(CaseName,CaseDate,TextArea) VALUES ("' + $('.caseName_h').val() + '", "' + $('.caseDate_h').val() + '","' + $('.caseTextArea_h').val() + '")'); } //function will be called when an error occurred function errorCB(err) { navigator.notification.alert("Error processing SQL: " + err.code); } //function will be called when process succeed function afterSuccessTableCreation() { console.log("success!"); db.transaction(getallTableData, errorCB); } //select all from SoccerPlayer function getallTableData(tx) { tx.executeSql('SELECT * FROM CaseTable', [], querySuccess, errorCB); } function querySuccess(tx, result) { var len = result.rows.length; var t; $('#folderData').empty(); for (var i = 0; i < len; i++) { $('#folderData').append( '
' + result.rows.item(i).CaseName + t+'
' + '' + result.rows.item(i).TextArea + '
' + '' + result.rows.item(i).CaseDate + '
' + '' + i + '' + ''+'Instend of show the value of 'i' in the view list, I need to show how many element in the table. I have to call synchronize because I call a query that counts the number of elements to 'result.rows.item (i). CaseName"this item... ?
Hello
If I understand correctly, you are looking for a SQL statement that you will get the count for the number of items in the table AB? If so, this can be useful:
http://www.w3schools.com/SQL/sql_func_count.asp
Please let me know if you have any other questions.
Tags: BlackBerry Developers
Similar Questions
-
Help, how to query the database using pagination
Hello
How to query the database using paging for large data.
any API for this?
Thank you in advance!Hello
You can specify XmlQueryContext::Lazy as the type of assessment and only call XmlResults:: next() comes as many times as you need.
John
-
I can't play video of videomega.tv on mozilla, but when I use chrome, it works. On mozilla that it still can not be charged, said just because the server or network failed, or may format not supported. I have already updated to flash player and use html5 extension, without result. How to solve this problem? Thank you...
Thank you for your advice, but when I checked it on topic: config, the value is 2, so I don't change anything.
When I search another solution, accidentally, I installed engine (socialmedia.com) unwanted search so I am forced to reset mozilla. After that, the two problem solved all of a sudden!
Thanks for all your help and advice, it is very appreciated by me.
-
My Macbook Air uses El Capitan 10.11.5. This operating system repeatedly freezes and the computer must be turned on / repeatedly. How to solve this problem?
Hello
Check if the hard disk needs repair.
Open the disk utility, located app in HD > Applications > utilities
Select Macintosh HD on the left then click the first aid tab, and then click Run.
-
problem iPhone 5s load is reduced to
My iPhone 5 s a problem that the accusation itself decreases without using the phone, I changed the battery it is always the same and I put it in airplane mode it's always the same problem how to solve this help please?
Please help me anyone
-
I am trying to download an application on my cable company, but it won't be over because my computer 'administrator' will not allow him. How to solve this. I'm the only person using the computer.
Start > run > control userpasswords2 > OK
will take you to what you need to access and change permissions for logon not required
On the users tab uncheck users must enter a user name and password to use this computer
other options are available to facilitate access
If a default administrator password has been entered it would probably be adminpass or empty field
In both cases, it would be entered twice or white field, then move the cursor to confirm the blank
as non-existent password then confirm white... you see an empty field is itself a password.
-
When activating my windows vista ultimate product, I get the response that the license key is already in use, let me know how to solve this problem?
KiranS Hello,
Judging by your post, it seems that Microsoft had technical problems when you tried to activate your copy of Vista by phone. Have you tried phoning the line Activation again?
The normal procedure is that if the activation fails through the automated system, the call is transferred to a real person. It is the only available option if you get the error 'use existing product key'.
I can only suggest that you try again the activation by phone and see what happens.
This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.
John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk | vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com
-
Windows Media Player opens when I type any key. This started 2 days ago and did the computer virtually unusable. The mouse is however immune to this phenomenon, so I can still use it.
No idea how to solve this problem?
Ideas:
- You have problems with programs
- Error messages
- Recent changes to your computer
- What you have already tried to solve the problem
Do a system restore. Choose at least 3 days ago when you did not have this problem as your restore point.
Start button > Search box, type system restore > press the Enter key > uac prompt > click on choose a different restore point > next > select dates as your restore point, until the click > next > finish
To sit and wait. The machine restarts when it's done.For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.
-
Browsing databases of Virtual Center failed: could not connect to server NFC, can any body help me how to solve this problem please
Hi Mallik7, please try the following steps, you must succeed to solve the problem.
To connect a client to vCenter directly to the ESX host error-free work.
Files/etc/vmware/config the ESX host contain the lines:
------------------------------------
authd.soapServer = 'TRUE '.
prefvmx.consolidateDeleteNFSLocks = "TRUE" authd.proxy.vpxa - nfc = "vmware - vpxa:vpxa - nfc.
Authd.proxy.vpxa - nfcssl = ' vmware - vpxa:vpxa - nfcssl.
------------------------------------
This problem occurs when a carriage return is missing from/etc/vmware/config. To resolve this issue, go to edit/etc/vmware/config:
1 make a backup of this file from the path - / etc/vmware/config, by running the following command:
CP/etc/vmware/config/var/tmp /.
2. edit/etc/vmware/config so that there is a return transport after the line:
prefvmx.consolidateDeleteNFSLocks = 'TRUE '.
While he reads the following:
---------------------------------------------
authd.soapServer = 'TRUE '.
prefvmx.consolidateDeleteNFSLocks = 'TRUE '.
Authd.proxy.vpxa - nfc = "vmware - vpxa:vpxa - nfc.
Authd.proxy.vpxa - nfcssl = ' vmware - vpxa:vpxa - nfcssl.
---------------------------------------------
3. restart the management agent spend.
Note: Make sure that you are not in your environment name resolution problems.
-
I just bought the app for photographers creative cloud when I try finally connect with PS CC, I received an error message that says "no detected subscription. I don't really know how to solve this problem, I used my Adobe ID to connect several times and it just still the same message.
Your subscription to cloud shows correctly on your account page?
If you have more than one email, you will be sure that you use the right Adobe ID?
https://www.adobe.com/account.html for subscriptions on your page from Adobe
.
If Yes
Some general information for a subscription of cloud
Cloud programs don't use serial... numbers you, connect you to your cloud account paying to download & install & activate... you may need to sign out of the cloud and restart your computer and log into the cloud for things to work
Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud
-Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
-http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
-http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
-http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
-ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp
-http://helpx.adobe.com/creative-cloud/kb/license-this-software.html
.
If no
This is an open forum, Adobe support... you need Adobe personnel to help
Adobe contact information - http://helpx.adobe.com/contact.html
Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">===>
-Select your product and what you need help with
-Click on the blue box "still need help? Contact us. "
-
After using a test, I recently bought the program. However, he still says trial expired. I can't understand how to solve this problem
Hello
You can try to disconnect and reconnect to the creative cloud app:-connect and disconnect activate Cloud Creative applications
Please visit:-https://helpx.adobe.com/manage-account-membership/cc-reverts-to-trial.html
-
I use iphone videos and still images in a project of first Pro CC. When I drag the videos in the timeline, they work fine, but when I drag still images, I have only a small part of the original photo. No idea how to solve this problem?
Right click on the photo in sequence and "ladder to the chassis '. Can also be set in the preferences and affect imports after the change
Thank you
Jeff
-
IM usuing window xp it could not coonect my 5s iphone in iTunes, itune wonder itune works only window 7 or a later version, how to solve this problem?
I think the compatibility of iTunes with XP can not exist in current versions
You may want an update of your Windows software
-
My email is not working, no idea how to solve this problem?
I have two addresses - email [email protected] that does not work and the [email protected] who works there. I have no warnings or error messages, but I have not received emails for a week and it will not send emails. No idea how to solve this problem? Ildi
OK let see VAT present one bit at a time.
You should send messages using the tassiemoments server no bigpond. I think I might even be a technical violation of their service life... The provider is used to cover their bets as we ISP block port 25 connections home. I can attest to Telstra/Bigpond do not do that my mail server has worked well until the server has exploded at Christmas.
There are significant problems with the server and especially e-mail with no records among other things a DNS server. See here the page is slow to load because it tests the configuration of the server to tassiemoments.
The technical contact for the domain is JOANNE SMITH, WUNDOWIE, WA perhaps that is where you should direct your questions.
-
fingerprint sensor does not work for my iphone 16 6 GB pls help how to solve this problem?
I have iPhone 6 grey 16 GB of model space suddenly my fingerprint sensor no longer works.
When I try to set touch id always displays "failed please go back and try again".
Please guide how to solve this problem.
The warranty expired 3 months ago
See this support document to help solving the problems of contact ID. If all else fails, then make an appointment at the Genius Bar from the Apple Store supplier or Service Center authorized Apple closest to have the material examined. They will explain your options. Use touch on iPhone and iPad - Apple Support ID
Maybe you are looking for
-
Can I remove icloud Desktop &; Documents?
If I download my Desktop folds and Documents under the Sierra to my iCloud drive - what happens if I stop? Specifically - will have local copies of the documents on my Mac? They will return to my Home Directory? The returned files will reflect any
-
MacBookPro successfully updated for the SSD but old disk HARD not accessible as external drive
OK people, Successfully, I upgraded my MBP late 2012 to 1 TB SSD with the help of the community here. Thank you. My old drive was an 8.1 El Capitan\Win Bootcamp and worked pretty well without fault. I used the disk utility to clone the OSX partition
-
Hello, I need to calculate from a hexadecimal string of the 16 bits in addition to the complement of all 16-bit words in the header and data. the chain is the next 7E03 00FE 2010 0000 000 C and the calculated checksum of it's 60E2 The description is
-
How can I EASILY remove a complete audio book from my Clip +.
I tried to play the audibook, using the arrow down and entered delete audiobook, YES, but there is to remove one of the 73 MP3 chapters. There must be a quicker way. Also, how can I check the contents on the CLIP + 4 GB memory
-
Cannot open Security Center - it is a new problem. __
I can't open my Security Center. It says "Cannot start the Security Center Service"