Wenn das Spiel gespeichert wird, wird ein timestamp mit der aktuellen Zeit (time()) in die DB geschrieben. Bei jedem Aufruf überprüft das Skript, ob es in der DB Werte gibt, die älter als der timeout sind (angenommen du hast in der Tabelle spiele die spiele, und createtime ist der timestamp: $now=time;
$query="DELETE * from spiele where $now-$timeout<createtime"; ) und löscht diese. Du kannst auch nur offene (z.B. AND offen=1) löschen lassen.
Jak
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona)
Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing.
\"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra)
|