I am having trouble finding the info I need... Here is generally what I am trying to do.
SQLite3 (I am new to this but have extensive MySQL/PHP experience). The database will hold about 1400 rows and be nearly entirely used as selects. This is for mobile access and trying to figure out how to select the data w/o access to PHP.
I found some code online I am trying to work with on a test db, but I am not getting anywhere.
- var selectAll = "SELECT * FROM mobile_page_history";
- function createDatabase(){
- try{
- if(window.openDatabase){
- var shortName = '../dbDEMO/mobileStats.db';
- var version = '3.7.7.1';
- var displayName = 'Mobile Stats';
- var maxSize = 200000;
- db = openDatabase(shortName, version, displayName, maxSize);
- }
- }catch(e){
- alert(e);
- }
- }
- function executeQuery($query,callback){
- try{
- if(window.openDatabase){
- db.transaction(
- function(tx){
- tx.executeSql($query,[],function(tx,result){
- if(typeof(callback) == "function"){
- callback(result);
- }else{
- if(callback != undefined){
- eval(callback+"(result)");
- }
- }
- },function(tx,error){});
- });
- return result;
- }
- }catch(e){}
- }
- function selectValues(){
- executeQuery(selectAll,function(result)
- {
- $("#resultsHolder").html(data)
- });
- }
I have a div with id of resultsHolder.
Thanks for looking!