Dear
Change below code :
your code :
transaction.executeSql('UPDATE payments SET amount_alloc=? where pay_number="p3"',[0]);
replace with :
transaction.executeSql("UPDATE payments SET amount_alloc=? where pay_number='p3'",[0]);
OR
transaction.executeSql('UPDATE payments SET amount_alloc=? where pay_number=\'p3\'',[0]);
your code :
transaction.executeSql('DELETE * FROM allocation WHERE pay_number="p3"');
replace with :
transaction.executeSql("DELETE FROM allocation WHERE pay_number='p3'");
OR
transaction.executeSql('DELETE FROM allocation WHERE pay_number=\'p3\'');