That link does not use the SQLite, but stores the information in localStorage (HTML5). But you can use the same code, with some adjustments to make it work with SQLite:
precode
// Start synchronization of tasks with cloud
function startSynchronization() {
var isOnline = localStorage.getItem('_isOnline');
if (isOnline == 1) {
var task;
Code: Select all
// Deleting
var tasks = localStorage.getItem('_tasksToDelete');
if (tasks) {
var tasksArr = eval('([' + tasks + '])');
while (tasksArr.length) {
task = tasksArr.shift();
if (task.id) {
delete_service.execute({data:{object_id: task.id}});
}
}
localStorage.setItem('_tasksToDelete', '');
}
// Creating
tasks = localStorage.getItem('_tasksToCreate');
if (tasks) {
var tasksArr1 = eval('([' + tasks + '])');
while (tasksArr.length) {
task = tasksArr.shift();
if (task.name) {
create_service.execute({data:{task: task.name}});
}
}
localStorage.setItem('_tasksToCreate', '');
}
}
listServiceExecute();
}
/code/pre
Using the above, you would collect all info within the SQLite database into an array and sync it with the Cloud. Instead of using the JSON.
This link should help with creating the database 
http://docs.phonegap.com/en/3.1.0/cor...