I have two tables: t1 and t2. I'd like to get a value from t2 and update t1 with it where t1.ID = t2.id
Now, I can do one line at a time. Is there a way to loop it through so that it would update all matching records?
Read up on how to do an UPDATE. Several examples here:
http://dev.mysql.com/doc/mysql/en/update.html