1

Hi,

How would I save the data inputted into a list into WebSQL, when using a foreach knockoutjs binding?

 <table class='producttable'>
            <tr>
                <th>Name</th>
                <th>Description</th>
                <th>Price</th>
            </tr>
            <tbody data-bind="foreach: products">
                <tr>
                    <td>
                        <input data-bind='value: name' />
                    </td>
                    <td><input data-bind='value: description' /></td>
                    <td><input data-bind='value: price' /> </td>
                                </tr>
                            </tbody>
  </table>
2
Contributors
2
Replies
20
Views
3 Years
Discussion Span
Last Post by lk123456
1

I have resolved this issue:

function saveproduct(product) {
    db.transaction(function (tx) {
        tx.executeSql('INSERT INTO products (name, description, price) VALUES (?, ?, ?)', [product.name, product.description, product.price]);
    });
}

I am now unsure of how to update a row of data that has been saved into WebSQL.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.