On load from db, value should increase by 1

rajji 03 May, 2013
I have a form which loads values from MySQL DB and on submit saves the changes to those fields. Now what I am looking for is to automatically increase the value a field by 1 on loading of the form.

In this case, we have a table in db having values assigned to each fields relevant to each customer. Lets say Customer A has an ID of 100 with query # of 1000. Each time this customer login and send us a query. We want their query # increase automatically by 1 and the customer don't have to increase them manually. Each customer has different query # depending upon their no .of queries.

Thanks regards
Saurabh Jain
GreyHead 03 May, 2013
Hi rajji,

I'm not sure that I understand what you need here. Please give a bit more detail.

Bob
rajji 07 May, 2013
I have a form which loads values from MySQL DB and on submit saves the changes to those fields. Now what I am looking for is to automatically increase the value a field by 1 on loading of the form.

In this case, we have a table in db having values assigned to each fields relevant to each customer. Lets say Customer A has an ID of 100 with query # of 1000. Each time this customer login and send us a query. We want their query # increase automatically by 1 and the customer don't have to increase them manually. Each customer has different query # depending upon their no .of queries.

Thanks regards
Saurabh Jain
GreyHead 07 May, 2013
Hi Saurabh Jain,

I'd do that using a Custom Code action in the On Submit event of your form to run a MySQL query that increases the count in the customer's record.

Bob
This topic is locked and no more replies can be posted.