Don't worry

I had coded the result handling in the wrong part of the function

so it was causing a cache effect

Thanks anyway

On Apr 1, 2:19 pm, Excell <[email protected]> wrote:
> Hi all
>
> Seem to have an issue with result from a query caching when the web
> app loads
>
> db.transaction(
>                     function (transaction) {
>                                 transaction.executeSql("SELECT * from game;",
>                                 [], // array of values for the ? placeholders
>                                 function(transaction, result){
>                                         for (var i=0; i < result.rows.length; 
> i++) {
>                         var row = result.rows.item(i);
>
>                                                 var positions = 
> row.playerDevicePos.split("|");
>                                                 
> player1Pos=parseInt(positions[0]);
>                                                 
> devicePos=parseInt(positions[1]);
>                     }
>
>                                 }
>                                 );
>                         }
>         );
>
> the first time it loads it returns the original set up data
>
> i use this to update the table
>
> db.transaction(
>                 function(transaction){
>                         transaction.executeSql(
>                                 'UPDATE game SET playerDevicePos=? WHERE 
> id=?;',
>                                 [playerDevicePos,gameId]
>                                 );
>                         //alert("Game Saved");
>                 }
>         );
>
> Thanks for any hel Excell(roger)

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

  • sqlite Excell
    • Re: sqlite Excell

Reply via email to