Welcome to AC Web.
Results 1 to 9 of 9
  1. #1

    Mass Mail for all Characters SQL


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    I'm trying for 2 days to do this but i cant make a succes code in SQL for all the characters to get a Welcome mail, can any1 help me? Thanks!

    - - - Updated - - -
    Last edited by Tr3fla; 02-27-2019 at 09:26 PM.

  2. #2
    Web Developer

    Join Date
    Oct 2010
    Location
    somewhere between <?php and ?>
    Posts
    2,973
    Try insert with select

    Example:
    Code:
    INSERT INTO mail_tbl (mailtitle, mailcontent, characterGUID)
    SELECT "Some random title", "Some random content", guid FROM characters;
    i dont have a characters database in front of me right now so i dont know the table names and the column structure for the tables... But with my example query i believe you can figure it out

  3. #3
    i still cant figure it out, error at syntax every time

  4. #4


    Join Date
    Apr 2008
    Location
    Security supervisor
    Posts
    935
    Quote Originally Posted by Tr3fla View Post
    i still cant figure it out, error at syntax every time
    post the error. what does it say

  5. #5
    Try the following query.

    Code:
    ALTER TABLE `characters`.`mail`
    	CHANGE COLUMN `id` `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Identifier' FIRST;
    
    SET @CurrentTime = (SELECT UNIX_TIMESTAMP()),
        @ExpireTime = (SELECT UNIX_TIMESTAMP('2019-04-01 12:00:00')), -- 1st of April 2019
        @Sender = ChangeThis; -- you can use some character's guid from a GM account
    
    INSERT INTO `characters`.`mail` (`messageType`, `stationery`, `mailTemplateId`, `sender`, `receiver`, `subject`, `body`, `has_items`, `expire_time`, `deliver_time`, `money`, `cod`, `checked`) 
    SELECT 0, 61, 225, @Sender, `characters`.`characters`.`guid`, "Hello", "Welcome to our server!", 0, @ExpireTime, @CurrentTime, 0, 0, 0 
    FROM `characters`.`characters`;
    I recommend executing this query when your server is closed.
    Last edited by mindsear; 02-23-2019 at 02:43 AM.

  6. #6
    doesnt work

    - - - Updated - - -

    i need to send a mail with a custom item to all characters from the server and there are around 87k chars

  7. #7
    Quote Originally Posted by Tr3fla View Post
    doesnt work

    - - - Updated - - -

    i need to send a mail with a custom item to all characters from the server and there are around 87k chars
    What's the error you get?
    What emulator you're using? Wow version?
    How old is your source code?

    Also, you didn't mention in your first post that you wanted to send an item to every player. You just wanted to send a mass mail with a welcome message.

    Next time try to be more specific, and give proper details.
    Last edited by mindsear; 02-28-2019 at 12:23 AM.

  8. #8

  9. #9


    Join Date
    Dec 2010
    Location
    www.TheForgottenCrusade.net
    Posts
    938

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Quote Originally Posted by Zaxer View Post
    Still haven't had the time to try it. Will do soon.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •