<?php

Game::addSqlQuery(
    'GAME_LIST',
    'SELECT * FROM MJ_GAME'
);

Game::addSqlQuery(
    'GAME_LIST_PUBLIC',
    'SELECT g.ID_GAME 
    FROM MJ_GAME as g
    JOIN MJ_ROUND as r on g.ID_GAME = r.ID_GAME
    JOIN MJ_PLAY as p on r.ID_ROUND = p.ID_ROUND
    WHERE g.PRIVATE=0'
);

Game::addSqlQuery(
    'GAME_GET_WITH_ID',
    'SELECT * FROM MJ_GAME WHERE ID_GAME=:id'
);

Game::addSqlQuery(
    'GAME_CREATE',
    'INSERT INTO MJ_GAME (ID_GAME, PRIVATE, CREATION_TIME)
    VALUES (NULL, :is_private, :creation_time)'
);