Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved [MySQL] Broadcast

Comments in 'Plugin Development' started by MineBuilderFR, Feb 3, 2016.

  1. MineBuilderFR
    Offline

    MineBuilderFR Active Member

    Joined:
    Mar 14, 2015
    Posts:
    56
    Minecraft User:
    MineBuilderFR
    Hii :)
    I want to select and broadcast Message To player the Number of player Online in Database (My Database name is : Dat) How to do ? Thanks For your reply :


    $p->sendMessage($this->database->query("SELECT //? ));

    Attached Files:

  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    applqpak and MineBuilderFR like this.
  3. MineBuilderFR
    Offline

    MineBuilderFR Active Member

    Joined:
    Mar 14, 2015
    Posts:
    56
    Minecraft User:
    MineBuilderFR
    I have look and now Work perfectly ! :) Thanks @PEMapModder :)))
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    You may find that using MySQL in the main thread brings significant lag though.
    applqpak likes this.
  5. Samueljh1H8sLag
    Offline

    Samueljh1H8sLag Active Member

    Joined:
    Jun 20, 2015
    Posts:
    168
    Minecraft User:
    Samueljh1_
    how significant?
    applqpak likes this.
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    depends on how busy your server is
    applqpak likes this.
  7. Samueljh1H8sLag
    Offline

    Samueljh1H8sLag Active Member

    Joined:
    Jun 20, 2015
    Posts:
    168
    Minecraft User:
    Samueljh1_
    even if a sql query takes 0.3/0.1 of a second? Its almost like a foreach statement
    applqpak likes this.
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    more than one tick is too much.
    applqpak and Samueljh1H8sLag like this.
  9. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    PHP:
    $sendername $sender->getName();
    $spielerEngDe "SELECT kills FROM datas WHERE name='$sendername'";
    $spieler $this->mysqli->query($spielerEngDe);
    $netzwerk mysqli_fetch_row($spieler);
    $p->sendMessage($this->database->query($netzwerk[0]));
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Don't use mysqli_*** functions and $mysqli->*** methods together. Don't mix them up.

Share This Page

Advertisement