]> ruin.nu Git - NDIRC.git/blobdiff - Commands/Members.pm
Update to new database structure
[NDIRC.git] / Commands / Members.pm
index 44cfe79d68ac3c62863fb2ec0d2c8f7d017af08f..1a759b7495348a9cb08cee7003f5988e821fb974 100644 (file)
@@ -35,11 +35,10 @@ sub def
 SELECT (c.landing_tick - tick()) AS eta, concat(i.shiptype||'/') AS shiptype
        , dc.username
 FROM calls c
-       JOIN incomings i ON i.call = c.id
+       JOIN incomings i USING (call)
        LEFT OUTER JOIN users dc ON dc.uid = c.dc
-       JOIN users u ON u.uid = c.member
-WHERE open AND (c.landing_tick - tick()) >= 7
-GROUP BY c.id,c.landing_tick,dc.username
+WHERE status = 'Open' AND (c.landing_tick - tick()) >= 7
+GROUP BY call,c.landing_tick,dc.username
 ORDER BY c.landing_tick;
                });
        $f->execute();