EMail-Notification for all unbetted matches for players without individual vbsoccer settings:
Code:
INSERT IGNORE INTO tableprefixsoccer_league_subscribe
(userid, abo_type)
SELECT userid, 2 FROM tableprefixusertextfield
WHERE `vbsoccerprefs` IS NULL AND EXISTS
(SELECT * FROM tableprefixsoccer_user_bet
WHERE userid=tableprefixusertextfield.userid
LIMIT 1);
OR (not recommended!!)
EMail-Notification for all matches for players without individual vbsoccer settings:
Code:
INSERT IGNORE INTO tableprefixsoccer_league_subscribe
(userid, abo_type)
SELECT userid, 1 FROM tableprefixusertextfield
WHERE `vbsoccerprefs` IS NULL AND EXISTS
(SELECT * FROM tableprefixsoccer_user_bet
WHERE userid=tableprefixusertextfield.userid
LIMIT 1);