Upon product install I need to add a row to a mysql table for each row that is in the table 'user'. How would I do this bring the userid and username intot he new table? I think it's something like this:
Code:
$vbuser =& $vbulletin->userinfo;
foreach ($vbuser AS $userid => $userid, $username => $username,) {
$db->query_write("INSERT INTO " . TABLE_PREFIX . "banners (
userid, username, title, url, link, ext, width, height, clicks, available, impressions, status
) VALUES (
'$userid', '$username', '', '', '', '', '', '', 0, '{$vbulletin->options['banner_impressions_join']}', 0, ''
)");
}
I know that $vbulletin->userinfo contains info for the user visiting the page, so it would not work. What do I need to do to make this work?