MySQL query for a Tag Cloud

OK, I found this in WordPress. I am not sure exactly how it works, but I haven’t seen this functionality before in MySQL. I am pretty sure that it is used for passing an array of variables to MySQL for use in a Tag Cloud.

INSERT INTO table (
id,
term,
order
) VALUES ” . join(‘,’, $values) . ” ON DUPLICATE KEY UPDATE order = VALUES(order);

Any help on this would be great. I plan to use this very soon.