and another table with following details
useid perwhy i need a procedure,because, the data to the first table is of follows
userid h1 h2 h3 h4 h5 h6 h7 date 1 p p p p p p p 2010-10-10 while data is updated in the table like new insertion or updation on the table the value in the table 2 should be updated consider value of table2 is userid per 1 50 it should be updated, the formula for update is (no of workhours-total hours end)/total no of work hourshow can i do this in MySQL,and how can i use the procedure in PHP?
you can use trigger in MySQL instead of procedure. The trigger will be called after insert or update action. In my experience, I only use store procedure with some complex database manipulation or make a transaction.
精彩评论