LAYOUT: fixed the login screen
[e-DoKo.git] / include / db.php
index 1e18f95f007a538d4136b6b9055e0ac3f99994c3..514bde271a48f2ce976c664ba94ff25c4211adb6 100644 (file)
@@ -1102,5 +1102,13 @@ function DB_get_exchanged_cards($hash)
   return $cards;
 }
 
-
+function DB_played_by_others($gameid)
+{
+  $gameids = array();
+  $result = DB_query("SELECT id FROM Game WHERE randomnumbers=(SELECT randomnumbers from Game where id=$gameid) and status='gameover'");
+  while($r = DB_fetch_array($result))
+    if($r[0]!=$gameid)
+      $gameids[]=$r[0];
+  return $gameids;
+}
 ?>
\ No newline at end of file