2

I'm working with HTML5 to create a client-side database using the Lawnchair Javascript library, but when y create a new Lawnchair object what i get is a new local storage, not a new database

var people = new Lawnchair('people');

the problem is that in local storage I have just one table, and i need to be able to create more than just one table.

Alberto Zaccagni
  • 30,779
  • 11
  • 72
  • 106
user528091
  • 21
  • 2
  • The title says something about a session, but your text talks about multiple databases, instead. What is it that you need, exactly? – jwueller Dec 02 '10 at 14:40

2 Answers2

0

You can ref to this page for local database usage.But not all browser support it yet.

http://blog.darkcrimson.com/2010/05/local-databases/

WaiLam
  • 997
  • 1
  • 9
  • 15
0

You might want to use Web SQL Database, but that's implemented only by Chrome, Safari, and Opera. If that is not a problem look here: http://www.html5rocks.com/tutorials/offline/storage/

By the way what do you mean with

in local storage I have just one table

?

You could use the local storage to hold different values, like so:

localStorage['foo'] = "foo";
localStorage['bar'] = "bar";
localStorage['baz'] = "baz";

Values are strings, so you can also save say json or something else if you like.

Alberto Zaccagni
  • 30,779
  • 11
  • 72
  • 106