Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INSERT IGNORE INTO user_remote_site_accounts (user_id,service_type,login,pass,date_created)
- SELECT user_id, service_type, login, pass, date_create FROM
- (SELECT MAX(id) AS maxid,
- CASE
- WHEN url REGEXP 'fileserve'=1 THEN 'fileserve'
- WHEN url REGEXP 'filesonic'=1 THEN 'filesonic'
- WHEN url REGEXP 'megaupload'=1 THEN 'megaupload'
- WHEN url REGEXP 'rapidshare'=1 THEN 'rapidshare'
- WHEN url REGEXP 'oron'=1 THEN 'oron'
- WHEN url REGEXP 'depositfiles'=1 THEN 'depositfiles'
- ELSE 'default'
- END AS service_type
- FROM user_premium_accounts
- WHERE url LIKE '%depositfiles%'
- OR url LIKE '%fileserve%'
- OR url LIKE '%filesonic%'
- OR url LIKE '%oron%'
- OR url LIKE '%rapidshare%'
- OR url LIKE '%megaupload%'
- GROUP BY user_id, service_type
- ) AS tab1
- JOIN user_premium_accounts upa ON tab1.maxid = upa.id
- GROUP BY user_id, service_type
Add Comment
Please, Sign In to add comment