Skip to content

Commit f8d5fb0

Browse files
committed
fix bug in corporate conundrum demo
1 parent b32ad90 commit f8d5fb0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/corporate-conundrum/wait.sql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
-- Redirect to the next question when all players have answered
2-
select 'shell' as component,
3-
CASE
2+
select CASE
43
(SELECT count(*) FROM answers WHERE question_id = $question_id AND game_id = $game_id::integer)
54
WHEN (SELECT count(*) FROM players WHERE game_id = $game_id::integer)
65
THEN '0; next-question.sql?game_id=' || $game_id || '&player=' || $player
76
ELSE 3
87
END as refresh,
9-
shell.*
10-
FROM shell;
8+
sqlpage_shell.*
9+
FROM sqlpage_shell;
1110
-- Insert the answer into the answers table
1211
INSERT INTO answers(game_id, player_name, question_id, answer_value)
1312
SELECT $game_id::integer as game_id,

0 commit comments

Comments
 (0)