Skip to content
Advertisement

Get results from SELECT then UPDATE it into the database MySQL and PHP

I want to get the time average by using this command in PHP :

so is this code below correct to combine update and avg:

I have two requests:

  1. I want to UPDATE another column with the average, so how can I do that?
  2. When I use the above SELECT I got the HH:MM but I just want the minutes only without the hours.

Advertisement

Answer

Try this

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement