Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
exactly i have a problem for counter the database value after I use .
example : I have Table ParameterCounter which have { Id and CounterValue } Value {1,1}
I want to update Counter value after I use 1 then in data base i have Value {1,2}
in Mysql i have query "UPDATE parameterCount SET counterValue = counterValue + 1 ;" but how to transform that query in controler of MVC?
if you can help me I will be appreciate it.
Posted
Updated 13-Aug-15 7:31am
v2
Comments
Dave Kreskowiak 13-Aug-15 13:35pm    
I can appreciate that English isn't your first language, but your question made no sense at all.
Member 11854019 13-Aug-15 13:38pm    
Ok now How to transform this query "UPDATE parameterCount SET counterValue = counterValue + 1" in controler mvc Dave
Arkadeep De 13-Aug-15 14:39pm    
call a controller with ajax after your operation to do so....or you can call a simple function...that also do your work...and as a data you may pass the value to be increased...

1 solution

Use ADO.net to interact with the database.

A Beginner's Tutorial for Understanding ADO.NET[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900