<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Haeffb</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Haeffb"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Haeffb"/>
	<updated>2026-04-15T12:32:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=File:Icon-stamp.png&amp;diff=17201</id>
		<title>File:Icon-stamp.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=File:Icon-stamp.png&amp;diff=17201"/>
		<updated>2011-07-09T14:35:23Z</updated>

		<summary type="html">&lt;p&gt;Haeffb: uploaded a new version of &amp;amp;quot;File:Icon-stamp.png&amp;amp;quot;: Timestamp icon for enyo toolbar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Timestamp icon for enyo toolbar&lt;/div&gt;</summary>
		<author><name>Haeffb</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Mojo_Design_Icons&amp;diff=17199</id>
		<title>Mojo Design Icons</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Mojo_Design_Icons&amp;diff=17199"/>
		<updated>2011-07-09T14:32:17Z</updated>

		<summary type="html">&lt;p&gt;Haeffb: /* Enyo Toolbar Icons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Icons can be anything that quickly relates to an application. No text should be used and the icon will be resized for other uses so keep this in mind as you design your icon.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Icons should be 64x64, but try and contain most of it in a 56x56 space. The 4px border will make sure that the re-size of the icon does not give poorly anti-aliased edges.&lt;br /&gt;
&lt;br /&gt;
== Circle Backing ==&lt;br /&gt;
&lt;br /&gt;
Most applications have a circle in the background, it has been recreated and below.&lt;br /&gt;
&lt;br /&gt;
{{icon|Mojo_Design_Circle_Back.png}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
(if anyone finds a better version or the real version overwrite it with the one above by clicking on it)&lt;br /&gt;
&lt;br /&gt;
== Enyo Toolbar Icons ==&lt;br /&gt;
{{icon|icon-info3.png}}{{icon|icon-mail.png}}{{icon|icon-stamp.png}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
=== WebOS Internals ===&lt;br /&gt;
&lt;br /&gt;
For projects under WebOS Internals DNS it is recommened that they use the icon templates.&lt;br /&gt;
&lt;br /&gt;
[[Icons|WebOS Internals Icon Templates]]&lt;/div&gt;</summary>
		<author><name>Haeffb</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=File:Icon-stamp.png&amp;diff=17197</id>
		<title>File:Icon-stamp.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=File:Icon-stamp.png&amp;diff=17197"/>
		<updated>2011-07-09T14:31:28Z</updated>

		<summary type="html">&lt;p&gt;Haeffb: Timestamp icon for enyo toolbar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Timestamp icon for enyo toolbar&lt;/div&gt;</summary>
		<author><name>Haeffb</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Mojo_Design_Icons&amp;diff=17195</id>
		<title>Mojo Design Icons</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Mojo_Design_Icons&amp;diff=17195"/>
		<updated>2011-07-09T05:24:23Z</updated>

		<summary type="html">&lt;p&gt;Haeffb: /* Enyo Toolbar Icons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Icons can be anything that quickly relates to an application. No text should be used and the icon will be resized for other uses so keep this in mind as you design your icon.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Icons should be 64x64, but try and contain most of it in a 56x56 space. The 4px border will make sure that the re-size of the icon does not give poorly anti-aliased edges.&lt;br /&gt;
&lt;br /&gt;
== Circle Backing ==&lt;br /&gt;
&lt;br /&gt;
Most applications have a circle in the background, it has been recreated and below.&lt;br /&gt;
&lt;br /&gt;
{{icon|Mojo_Design_Circle_Back.png}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
(if anyone finds a better version or the real version overwrite it with the one above by clicking on it)&lt;br /&gt;
&lt;br /&gt;
== Enyo Toolbar Icons ==&lt;br /&gt;
{{icon|icon-info3.png}}{{icon|icon-mail.png}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
=== WebOS Internals ===&lt;br /&gt;
&lt;br /&gt;
For projects under WebOS Internals DNS it is recommened that they use the icon templates.&lt;br /&gt;
&lt;br /&gt;
[[Icons|WebOS Internals Icon Templates]]&lt;/div&gt;</summary>
		<author><name>Haeffb</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=File:Icon-mail.png&amp;diff=17193</id>
		<title>File:Icon-mail.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=File:Icon-mail.png&amp;diff=17193"/>
		<updated>2011-07-09T05:23:02Z</updated>

		<summary type="html">&lt;p&gt;Haeffb: Email icon for enyo toolbar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Email icon for enyo toolbar&lt;/div&gt;</summary>
		<author><name>Haeffb</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Mojo_Design_Icons&amp;diff=17145</id>
		<title>Mojo Design Icons</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Mojo_Design_Icons&amp;diff=17145"/>
		<updated>2011-07-08T03:18:52Z</updated>

		<summary type="html">&lt;p&gt;Haeffb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Icons can be anything that quickly relates to an application. No text should be used and the icon will be resized for other uses so keep this in mind as you design your icon.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Icons should be 64x64, but try and contain most of it in a 56x56 space. The 4px border will make sure that the re-size of the icon does not give poorly anti-aliased edges.&lt;br /&gt;
&lt;br /&gt;
== Circle Backing ==&lt;br /&gt;
&lt;br /&gt;
Most applications have a circle in the background, it has been recreated and below.&lt;br /&gt;
&lt;br /&gt;
{{icon|Mojo_Design_Circle_Back.png}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
(if anyone finds a better version or the real version overwrite it with the one above by clicking on it)&lt;br /&gt;
&lt;br /&gt;
== Enyo Toolbar Icons ==&lt;br /&gt;
{{icon|icon-info3.png}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
=== WebOS Internals ===&lt;br /&gt;
&lt;br /&gt;
For projects under WebOS Internals DNS it is recommened that they use the icon templates.&lt;br /&gt;
&lt;br /&gt;
[[Icons|WebOS Internals Icon Templates]]&lt;/div&gt;</summary>
		<author><name>Haeffb</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=File:Icon-info3.png&amp;diff=17143</id>
		<title>File:Icon-info3.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=File:Icon-info3.png&amp;diff=17143"/>
		<updated>2011-07-08T02:54:00Z</updated>

		<summary type="html">&lt;p&gt;Haeffb: Info icon for enyo toolbar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Info icon for enyo toolbar&lt;/div&gt;</summary>
		<author><name>Haeffb</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Mojo_Design_Icons&amp;diff=17141</id>
		<title>Mojo Design Icons</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Mojo_Design_Icons&amp;diff=17141"/>
		<updated>2011-07-08T02:53:05Z</updated>

		<summary type="html">&lt;p&gt;Haeffb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Icons can be anything that quickly relates to an application. No text should be used and the icon will be resized for other uses so keep this in mind as you design your icon.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Icons should be 64x64, but try and contain most of it in a 56x56 space. The 4px border will make sure that the re-size of the icon does not give poorly anti-aliased edges.&lt;br /&gt;
&lt;br /&gt;
== Circle Backing ==&lt;br /&gt;
&lt;br /&gt;
Most applications have a circle in the background, it has been recreated and below.&lt;br /&gt;
&lt;br /&gt;
{{icon|Mojo_Design_Circle_Back.png}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
(if anyone finds a better version or the real version overwrite it with the one above by clicking on it)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
== Enyo Toolbar Icons ==&lt;br /&gt;
{{icon|icon-info3.png}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== WebOS Internals ===&lt;br /&gt;
&lt;br /&gt;
For projects under WebOS Internals DNS it is recommened that they use the icon templates.&lt;br /&gt;
&lt;br /&gt;
[[Icons|WebOS Internals Icon Templates]]&lt;/div&gt;</summary>
		<author><name>Haeffb</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=8241</id>
		<title>Application:OpenSSH</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=8241"/>
		<updated>2010-01-09T14:55:48Z</updated>

		<summary type="html">&lt;p&gt;Haeffb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [http://www.openssh.com/ OpenSSH Home Page] and read the [http://www.openssh.com/manual.html OpenSSH Manual Pages] before using this package.&lt;br /&gt;
&lt;br /&gt;
If you are connecting to your webOS device from a Windows host computer, please read the [http://unixwiz.net/techtips/putty-openssh.html Secure Linux/UNIX access with PuTTY and OpenSSH Tech Tip] and follow those instructions for generating your SSH keys.  For the section &amp;quot;Install public key on Linux system&amp;quot;, you will need to put the &amp;quot;Public Key for pasting into OpenSSH authorized_keys file&amp;quot; into a /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Optware installs openssh under /opt, so you should replace any references to /bin, /sbin, and /etc in the OpenSSH documentation with /opt/bin, /opt/sbin and /opt/etc respectively.&lt;br /&gt;
&lt;br /&gt;
If you are not able to follow the [http://unixwiz.net/techtips/putty-openssh.html Secure Linux/UNIX access with PuTTY and OpenSSH Tech Tip] to generate your SSH keys, you can use the [http://www.webos-internals.org/wiki/Application:Terminal Terminal] application to create your secure SSH keys for use with OpenSSH directly on your webOS device.  Your public ssh key needs to be stored in /home/root/.ssh/authorized_keys to be read by OpenSSH to allow root login via ssh keys.&lt;br /&gt;
&lt;br /&gt;
You can use:&lt;br /&gt;
&lt;br /&gt;
 /opt/bin/ssh-keygen&lt;br /&gt;
&lt;br /&gt;
to create the private and public keys. Accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated:&lt;br /&gt;
&lt;br /&gt;
 mv /home/root/.ssh/id_rsa.pub /home/root/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
to move the public key to become the /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Now the secret key needs to be transferred to the workstation you want to log into the Pre. First copy the secret key to the accessible area with&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa&lt;br /&gt;
&lt;br /&gt;
Tap on the USB symbol at the bottom of the Pre screen and choose 'USB Device' in order to access the media. Move the secret key to your workstation and follow the terminal software's instructions on how to make this new secret key known to the terminal.&lt;/div&gt;</summary>
		<author><name>Haeffb</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Mojo_Storage_Database&amp;diff=4336</id>
		<title>Mojo Storage Database</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Mojo_Storage_Database&amp;diff=4336"/>
		<updated>2009-08-13T21:14:15Z</updated>

		<summary type="html">&lt;p&gt;Haeffb: /* Creating a Database and a Table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was created to help others by giving a basic example of creating a new database for your application and storing some data in it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SQL Overview==&lt;br /&gt;
&lt;br /&gt;
It needs to be mentioned that SQLite (what HTML5 uses), is not as controlling as other databases. For one it's not going to give you an error when you insert text into an integer, or anything like that so regex all input for users or limit it in some way.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-color:silver;&amp;quot;&lt;br /&gt;
|Data Type&lt;br /&gt;
|Example&lt;br /&gt;
|-&lt;br /&gt;
|INTEGER&lt;br /&gt;
|'0' '123' '3939'&lt;br /&gt;
|-&lt;br /&gt;
|REAL&lt;br /&gt;
|'1.1' '10.0'&lt;br /&gt;
|-&lt;br /&gt;
|TEXT&lt;br /&gt;
|'foo' 'bar'&lt;br /&gt;
|-&lt;br /&gt;
|BLOB&lt;br /&gt;
|[binary data / images]&lt;br /&gt;
|-&lt;br /&gt;
|NULL&lt;br /&gt;
|absolutely nothing&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Creating a Database and a Table==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var name = &amp;quot;MyDB&amp;quot;;  // required&lt;br /&gt;
var version = &amp;quot;0.1&amp;quot;;  // required&lt;br /&gt;
var displayName = &amp;quot;My Mojo-Driven database&amp;quot;; // optional&lt;br /&gt;
var size = 200000;  // optional&lt;br /&gt;
&lt;br /&gt;
var db = openDatabase(name, version, displayName, size);&lt;br /&gt;
&lt;br /&gt;
if (!db) {&lt;br /&gt;
  Mojo.Log.error(&amp;quot;Could not open database&amp;quot;);&lt;br /&gt;
} else {&lt;br /&gt;
  var sql = &amp;quot;CREATE TABLE IF NOT EXISTS 'my_table' (id INTEGER PRIMARY KEY, num REAL, data TEXT)&amp;quot;;  // check sqlite data types for other values&lt;br /&gt;
  db.transaction( function (transaction) {&lt;br /&gt;
    transaction.executeSql(sql,  // SQL to execute&lt;br /&gt;
                           [],    // array of substitution values (if you were inserting, for example)&lt;br /&gt;
                           function(transaction, results) {    // success handler&lt;br /&gt;
                             Mojo.Log.info(&amp;quot;Successfully created table&amp;quot;); &lt;br /&gt;
                           },&lt;br /&gt;
                           function(transaction, error) {      // error handler&lt;br /&gt;
                             Mojo.Log.error(&amp;quot;Could not create table: &amp;quot; + error.message);&lt;br /&gt;
                           }&lt;br /&gt;
    );&lt;br /&gt;
  });&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to use non-anonymous event handlers, the function supplied to db.transaction has to be bound to the current context, as in the folling, modified example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
SceneAssistant.prototype.createMyTable = function(){&lt;br /&gt;
  var name = &amp;quot;MyDB&amp;quot;;  // required&lt;br /&gt;
  var version = &amp;quot;0.1&amp;quot;;  // required&lt;br /&gt;
  var displayName = &amp;quot;My Mojo-Driven database&amp;quot;; // optional&lt;br /&gt;
  var size = 200000;  // optional&lt;br /&gt;
&lt;br /&gt;
  var db = openDatabase(name, version, displayName, size);&lt;br /&gt;
  if (!db) {&lt;br /&gt;
    Mojo.Log.error(&amp;quot;Could not open database&amp;quot;);&lt;br /&gt;
  } else {&lt;br /&gt;
    var sql = &amp;quot;CREATE TABLE IF NOT EXISTS 'my_table' (id INTEGER PRIMARY KEY, num REAL, data TEXT)&amp;quot;;  // check sqlite data types for other values&lt;br /&gt;
    db.transaction(&lt;br /&gt;
      function (transaction) { &lt;br /&gt;
        transaction.executeSql(sql, [],&lt;br /&gt;
          this.dbSuccessHandler.bind(this),&lt;br /&gt;
          this.dbErrorHandler.bind(this)); &lt;br /&gt;
      }.bind(this)); //this is important!&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
SceneAssistant.prototype.dbSuccessHandler = function(transaction, results){}&lt;br /&gt;
SceneAssistant.prototype.dbErrorHandler = function(transaction, errors){}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===openDatabase===&lt;br /&gt;
&lt;br /&gt;
If you try to look for '''MyDB''' on the filesystem, you won't find it.  The '''openDatabase''' method creates an entry in the '''Databases''' table in '''/var/usr/home/root/html5-databases/Databases.db''' which points to the actual location of your database.  Note that the details in the Databases table are what you specified in openDatabase except version.  Version is contained in the '''__WebKitDatabaseInfoTable__''' table in the actual database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the examples contained in this page, the database that is created has a maximum storage capacity of 1 MB.  If you need a larger database, then append ext: to the beginning of the database name.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var db = openDatabase(&amp;quot;ext:MyDB&amp;quot;, &amp;quot;0.1&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create the database in '''/media/internal/.app-storage'''.&lt;br /&gt;
&lt;br /&gt;
==Inserting a Row==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var myNum = 512.785;&lt;br /&gt;
var test = &amp;quot;I'm test data!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
var db = openDatabase(&amp;quot;MyDB&amp;quot;, &amp;quot;0.1&amp;quot;); // this is all that is required to open an existing DB&lt;br /&gt;
var sql = &amp;quot;INSERT INTO 'my_table' (num, data) VALUES (?, ?)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
db.transaction( function (transaction) {&lt;br /&gt;
  transaction.executeSql(sql,  [myNum, test], &lt;br /&gt;
                         function(transaction, results) {    // success handler&lt;br /&gt;
                           Mojo.Log.info(&amp;quot;Successfully inserted record&amp;quot;); &lt;br /&gt;
                         },&lt;br /&gt;
                         function(transaction, error) {      // error handler&lt;br /&gt;
                           Mojo.Log.error(&amp;quot;Could not insert record: &amp;quot; + error.message);&lt;br /&gt;
                         }&lt;br /&gt;
  );&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inserting Multiple Rows==&lt;br /&gt;
&lt;br /&gt;
With asynchronous database methods, you can really screw things up if you try to do too many transacations in rapid succession.  Luckily, you can run as many executeSql methods inside a single transaction as you need.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var dataArray = [];&lt;br /&gt;
for(var i = 0; i &amp;lt; 100; i++) {&lt;br /&gt;
  dataArray[i] = i;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var db = openDatabase(&amp;quot;MyDB&amp;quot;, &amp;quot;0.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
db.transaction( function (transaction) {&lt;br /&gt;
  for(var i=0; i &amp;lt; dataArray.length; i++) {&lt;br /&gt;
    var sql = &amp;quot;INSERT INTO 'my_table' (num, data) VALUES (?, ?)&amp;quot;;&lt;br /&gt;
    transaction.executeSql(sql,  [dataArray[i], dataArray[i]], &lt;br /&gt;
                           function(transaction, results) {    // success handler&lt;br /&gt;
                             Mojo.Log.info(&amp;quot;Successfully inserted record&amp;quot;); &lt;br /&gt;
                           },&lt;br /&gt;
                           function(transaction, error) {      // error handler&lt;br /&gt;
                             Mojo.Log.error(&amp;quot;Could not insert record: &amp;quot; + error.message);&lt;br /&gt;
                           }&lt;br /&gt;
    );&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Retrieving Data==&lt;br /&gt;
&lt;br /&gt;
When a query returns results to the success handler, the rows are contained in '''.rows'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var db = openDatabase(&amp;quot;MyDB&amp;quot;, &amp;quot;0.1&amp;quot;);&lt;br /&gt;
var sql = &amp;quot;SELECT * FROM 'my_table'&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
db.transaction(function(transaction) {&lt;br /&gt;
  transaction.executeSql(sql, [],&lt;br /&gt;
                         function(transaction, results) {&lt;br /&gt;
                           // results.rows holds the rows returned by the query&lt;br /&gt;
                           var my_num = results.rows.item(0).num; // returns value of column num from first row&lt;br /&gt;
                         },&lt;br /&gt;
                         function(transaction, error) {&lt;br /&gt;
                           Mojo.Log.error(&amp;quot;Could not read&amp;quot;);&lt;br /&gt;
                         });&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Haeffb</name></author>
	</entry>
</feed>