Page 1 of 1

update database while a button is clicked

Posted: Wed Jul 23, 2014 3:00 pm
by JP7001627

Good day, I'm trying to update the status of an item when i am clicking a button

Example:
Image

I would like to update the database whenever one of the button (Avail/NotAvail) is clicked.

I have created the database update service but how do I update the table with the button click.


update database while a button is clicked

Posted: Wed Jul 23, 2014 3:05 pm
by Kateryna Grynko

Hello,

You would need to invoke the service on button click event.


update database while a button is clicked

Posted: Wed Jul 23, 2014 3:32 pm
by JP7001627

Sorry I forgot to mention that Yes i know tis part but i would like to know how to update the database with the right value

Example

Table format:
Item_id | Item_name | Item_status

0025 | Laptop | Available

Now when I have the Item_id sored in a Local storage variable and click on Not Available how do I get the data for Item_Id 0025 to have it Item_status update To Not Available

Usually i would use a SQL query like:

UPDATE Table_Name
SET Item_status = 'Not Available'
Where Item_id = '0025'

When i click on the button


update database while a button is clicked

Posted: Wed Jul 23, 2014 9:04 pm
by Evgene Karachevtsev

Hello,

Please look at this link: http://devcenter.appery.io/documentat...