I have the following code which inserts a "task" into a table with a value for the "task". I am trying to modify this statement to insert multiple values into multiple columns, but I cant seem to get it to work since I am unfamiliar with the format.
Can sombody show me how the can be modified to insert multiple values?
var item = this.$.newItem.getValue();
this.$.db.query( 'INSERT INTO tasks ( task ) VALUES ( ? )', { values: [ item ] } );
Thanks alot.
I am assuming you didn't mean to tag this MySQL....
However - a useful class for helping out with Enyo DB queries is:
https://github.com/onecrayon/database-webos
One crayon's implementation. Works very nicely for Enyo.