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

 <table class='producttable'>
            <tbody data-bind="foreach: products">
                        <input data-bind='value: name' />
                    <td><input data-bind='value: description' /></td>
                    <td><input data-bind='value: price' /> </td>

Recommended Answers

All 2 Replies

Member Avatar for diafol

Hmm, hasn't webSQL been deprecated?

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.