Round.sql.php 866 Bytes
Newer Older
Zohten's avatar
Zohten committed
1 2
<?php

3
Round::addSqlQuery(
Zohten's avatar
Zohten committed
4 5 6 7
    'ROUND_LIST',
    'SELECT * FROM MJ_ROUND'
);

8
Round::addSqlQuery(
Zohten's avatar
Zohten committed
9 10 11 12
    'ROUND_GET_WITH_ID',
    'SELECT * FROM MJ_ROUND WHERE ID_ROUND=:id'
);

13
Round::addSqlQuery(
Zohten's avatar
Zohten committed
14
    'ROUND_GET_USERS',
Zohten's avatar
Zohten committed
15 16 17 18 19 20 21 22 23
    'SELECT usr.ID_USER,
    usr.ID_ROLE,
    usr.LOGIN,
    usr.AVATAR,
    usr.LASTNAME,
    usr.FIRSTNAME,
    usr.MAIL,
    usr.BAN_ACCOUNT,
    usr.LAST_IP 
Zohten's avatar
Zohten committed
24 25 26 27
    FROM MJ_USER as usr
    JOIN MJ_PLAY as p on p.ID_USER = usr.ID_USER
    JOIN MJ_ROUND as r on r.ID_ROUND = p.ID_ROUND
    WHERE r.ID_ROUND=:id'
Zohten's avatar
Zohten committed
28 29
);

30
Round::addSqlQuery(
Zohten's avatar
Zohten committed
31 32 33
    'ROUND_CREATE',
    'INSERT INTO MJ_ROUND (ID_ROUND ,ID_GAME ,PREVAILING_WIND ,SEED ,BEGINING ,ENDING ,ACTIONS)
    VALUES (NULL, :id_game, :prevailing_wind, :seed, :begin_date, NULL, NULL)'
Zohten's avatar
Zohten committed
34 35
);

36
Round::addSqlQuery(
Zohten's avatar
Zohten committed
37 38 39
    'ACTION_UPDATE',
    'UPDATE MJ_ROUND 
    SET ACTIONS = :actions WHERE ID_ROUND = :id'
Zohten's avatar
Zohten committed
40
);