I wanted to know whether i can direct update mysql datas to add (+) the values, without needing to fetch them.
For example:
My database is like this,
data1 = 56
so to add a 4 to it, i will first fetch the data from the database then,
$data1 = $data1 + 4;
and finally again perform a Update query.
So is there is way i can send like add +4 to the current value of data1.
I am using php lanuage.
Thank You
Like… this?
A look into basic SQL syntax seems advisable. 😉
If you are working with PHP to manipulate your data, a deeper look into the mysqli_* functions family in general and prepared/parameterized statements in particular is advisable as well.