Solved SQL DataBase

Discussion in 'Rust Development' started by DylanSMR, Aug 23, 2016.

  1. So im creating a SQL data base with 3 tables as of this moment:

    Code:
    mysql> describe players;
    +-------+------------------+------+-----+---------+----------------+
    | Field | Type             | Null | Key | Default | Extra          |
    +-------+------------------+------+-----+---------+----------------+
    | id    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
    | name  | varchar(150)     | NO   |     | NULL    |                |
    +-------+------------------+------+-----+---------+----------------+
    2 rows in set (0.01 sec)mysql> describe commands;
    +---------------+------------------+------+-----+---------+----------------+
    | Field         | Type             | Null | Key | Default | Extra          |
    +---------------+------------------+------+-----+---------+----------------+
    | id            | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
    | command       | varchar(150)     | NO   |     | NULL    |                |
    | authenticator | varchar(150)     | NO   |     | NULL    |                |
    +---------------+------------------+------+-----+---------+----------------+
    3 rows in set (0.01 sec)mysql> describe describe messages
        -> describe messages;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'describe messages
    describe messages' at line 1
    mysql> describe messages;
    +---------+------------------+------+-----+---------+----------------+
    | Field   | Type             | Null | Key | Default | Extra          |
    +---------+------------------+------+-----+---------+----------------+
    | id      | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
    | name    | varchar(150)     | NO   |     | NULL    |                |
    | message | varchar(150)     | NO   |     | NULL    |                |
    +---------+------------------+------+-----+---------+----------------+
    3 rows in set (0.01 sec)
    With the commands table would I be able to send commands to other servers? Same with the messages would I be able to send messages to another server?

    -For the command section basically it would store it in another server that was selected and that server would read it and hopefully running the command listed.
     
  2. Im gonna kind of turn this into a further support thread for me and others. Quick question - How would I do this inside a C# program as turning it into a var returns a error:
    Code:
    SELECT COUNT(*) FROM table.name;
    Im requesting to get the COUNT which should be three but since I cannot transform that into a variable i'm a bit confused.
    [DOUBLEPOST=1471987929][/DOUBLEPOST]As preforming that in SQL would result in:
    Code:
    mysql> SELECT COUNT(*) FROM messages;
    +----------+
    | COUNT(*) |
    +----------+
    |        3 |
    +----------+
     
  3. Wulf

    Wulf Community Admin

    Why not use a free database API online that store info temporarily instead of a full database?
     
  4. Gonna be moving this to a separate thread as this was based on a question other then that :D
     
    Last edited by a moderator: Aug 24, 2016