Let’s say I have two tables as shown:
user
id plan course_limit username
10 0 ahmad
note: plan is enum field containing ”,’a’,’b’,’c’.
course
id user_id username
1 10 ahmad
Now I want when a user insert into course as shown I want the course_limit to increment by 1 for that user so that I can apply a limit.
now i don,t want to use triggers as my hosting does not support so i want to use php and do this. plz help me.
You could run an
UPDATEstatement after you run theINSERT.(If you are using MySQL) Ex: