title: Displaying sql records in a listview
body: <p>I have some code below:</p>
  
  <pre><code>transaction.executeSql('SELECT * FROM Table1 ORDER BY date DESC', [],
                        function(transaction, result) {
                        if (result != null &amp;&amp; result.rows != null) {
                        for (var i = 0; i &lt; result.rows.length; i++) {
                        var row = result.rows.item(i);
                        $('#records').append('&lt;li&gt;&lt;a href ="#"&gt;' + 'item1: ' + row['row1'] + '&lt;br&gt;' + 'item2: ' + row['row2'] + '&lt;br&gt;' + 'item3: ' + row['row3'] + '&lt;br&gt;' + 'item4: ' + row['row4'] + '&lt;/a&gt;&lt;/li&gt;');
  
                                        $( "#records" ).listview().listview("refresh");
                                        }
                                        }
                                        },errorHandler);
  },errorHandler,nullHandler);
  </code></pre>
  
  <p>As you can see, each time I input a record, all of this is displayed as a list item in a listview.  But my problem is, the part where I have appended a href = "#".  This is to make each list item linked, but I want a link to a different location depending on the record.  Right now, each record would link to the same place.  </p>
  
  <p>Is there a way to put that href somewhere else so that it can depend on each list item?</p>
  
  <p>the HTML where the list appears is below:</p>
  
  <pre><code> &lt;div data-role = "content"&gt;
  
         &lt;ul id = "records"&gt;&lt;/ul&gt;
  
   &lt;/div&gt;
  </code></pre>
  
  <p>Please let me know if the question isn't clear, I'll try and make it clearer.  Thanks</p>