Jump to content

[SOLVED] Update one table from another table


The Little Guy

Recommended Posts

I would like to perform a query similar to this:

 

UPDATE `search_video` SET `search_video`.`rank` = ROUND(AVG(`votes`.`vote`)) WHERE `id` = 'iBfH0qsrowWuS' GROUP BY `votes`.`objID`

 

In one table I have a list of numbers and an id (currently the id's are all the same) but in that table I want to take the average of the current id's and round (works).

 

Next I want to use that result and update another table, how can I do that?

 

The above is what I currently have.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.