OK, here's the scenario. I have two tables. The first is a standard members table with `id`, `last_logged_in`, and `member_type` fields among others.
The second table contains the same 3 fields I mentioned specifically above. However, this table is only updated once per week on a crontab script.
So, I would like to update the second table using ONE query with the respective data from the first tables.
Here's my pathetic attempts
Code: Select all
UPDATE `table_two` SET `last_logged_in` = (SELECT `last_logged_in` FROM `table_one`)Code: Select all
UPDATE `table_two` SET `last_logged_in` = (SELECT `last_logged_in` FROM `table_one`) GROUP BY `member_id`