This is a part of a chrome extension.
I want to select the names , id and urls for some bookmarks and Bookmark folders. Store this info into tables - bookmarkSync and groupSync. Check an existing table(bookmarks and groups) if there is a record for a bookmark or folder(number of visits, etc). Replace tbookmarks with bookmarkSync and groups with groupssync.
speeddial.storage.Sync = function() {
chrome.bookmarks.getChildren(String(localStorage['rootFolderID']), function(newSync){
speeddial.storage.db.transaction(function(tx){
tx.executeSql('DELETE FROM bookmarksSync',null,null,speeddial.storage.onError);
tx.executeSql('DELETE FROM groupsSync',null,null,speeddial.storage.onError);
for (var i=0; i<newSync.length; i++){
if(!newSync[i].url)
{
tx.executeSql('SELECT INTO groupsSync FROM groups', [],null
,speeddial.storage.onError);
}
...
//above is the end of else statement
}
})
})
}
I want to use SELECT * INTO to copy some values from one SQL table to another. When I use the above I get near INTO syntax error. I WANT TO NOW HOW TO DO BOTH THINGS - copy the values of some columns form table A to table B based on a specific column value, and completely replacing the contend of table A with this of table B.