This part of PHP and SQL is totally new to me where I need to use maths to update a table.
I currently have a table avis_credits with one row only in this table
The table deducts credits as the user uses the system from qty_credits, but i want to be able to add additional credits to his account as per example:
Client has currently 10 credits left he purchases 100 credits so the system must take the current credits and add the 100 to it giving me the 110 credits. I am doing this currently manual adding it my side and updating the table with this expresion.
"UPDATE avis_credits SET credits='$qty_credit'";
What I would like is that the system looks up the current credits and adds the new credits to the row.
I have tried this
"UPDATE avis_credits SET credits='<?php echo qty_credit?> + $qty_credit'";
But it is not working at all. Is it because I am trying to do too many functions in the one string? Or is it because The maths equation is wrong as I have no idea how to write it?