I'm trying to learn how to use AlaSQL and want to perform an update command on an array of objects, this is what I was trying to do:
alasql('UPDATE ? SET cc_fee=? WHERE id=?', [$scope.payments, response.cc_fee, response.id]);
That returns a parsing error that it was expecting a literal rather then an expression.
I also tried this:
alasql('UPDATE $scope.payments SET cc_fee=? WHERE id=?', [response.cc_fee, response.id]);
That didn't create any errors, but it didn't alter the object at all.
$scope.payments
is a simple array of objects.
Any ideas on the correct way to do this?