Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin Vrel
projet-cdaw
Commits
abb23dae
Commit
abb23dae
authored
Dec 02, 2020
by
Zohten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added public list
parent
e782749d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Game.sql.php
BackEnd/src/sql/Game.sql.php
+7
-2
gameRequest.http
BackEnd/src/testRequests/gameRequest.http
+1
-1
No files found.
BackEnd/src/sql/Game.sql.php
View file @
abb23dae
...
...
@@ -7,11 +7,16 @@ Game::addSqlQuery(
Game
::
addSqlQuery
(
'GAME_LIST_PUBLIC'
,
'SELECT g.ID_GAME
'SELECT ID_GAME, NB_PLAYER
FROM(
SELECT g.ID_GAME, count(p.ID_USER) as NB_PLAYER, count(r.ID_ROUND) as NB_ROUND_PLAYED
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'
WHERE g.PRIVATE=0
GROUP BY g.ID_GAME, p.ID_USER
) as r
WHERE r.NB_PLAYER <=3 AND r.NB_ROUND_PLAYED=1'
);
Game
::
addSqlQuery
(
...
...
BackEnd/src/testRequests/gameRequest.http
View file @
abb23dae
...
...
@@ -11,5 +11,5 @@ GET http://localhost/index.php/game/public
POST http://localhost/index.php/game
{
"is_private": "
1
"
"is_private": "
0
"
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment