Commit 8ba59eef authored by stph's avatar stph
Browse files

Fix bug, need to add login to join operation

parent 294fab03
......@@ -31,12 +31,12 @@ class DB {
is_available(:utclogin, week, year) AS is_available,
CASE
WHEN s.api IS NULL THEN 0 /* student has not yet subscribed */
WHEN s.validation IS NULL THEN 0.5 /* student has subscribed and wait for valdiation */
WHEN s.validation IS NULL THEN 0.5 /* student has subscribed and wait for validation */
WHEN s.validation THEN 1 /* student subscription has been validated */
ELSE -1 END AS validation /* student subscription has been declined or other subscription has been accepted the same week */
FROM vapi a
LEFT JOIN subscribe s
ON a.id = s.api
ON a.id = s.api AND s.utclogin = :utclogin
WHERE semester=:semester AND year=:year
ORDER BY week, code';
$st = $this->conn->prepare($sql);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment