Limit sender/receipient to those from the last 2 years
authorJoey Schulze <joey@infodrom.org>
Sat, 21 Apr 2007 15:17:27 +0000 (15:17 +0000)
committerJoey Schulze <joey@infodrom.org>
Sat, 21 Apr 2007 15:17:27 +0000 (15:17 +0000)
src/InfoCon/account/edit.wml

index b6252be..d82404c 100644 (file)
@@ -107,7 +107,9 @@ input.submit {
 <select id=from_to name=from_to>
 <option>
 <?
-  $query = "SELECT DISTINCT from_to FROM $table WHERE blz_kto = '$blzkto' ORDER BY from_to";
+  $query = "SELECT DISTINCT from_to FROM $table "
+         ."WHERE blz_kto = '$blzkto' AND datum >= now() - interval '2 years' "
+         ."ORDER BY from_to";
   $sth = pg_exec ($dbh, $query);
 
   for ($nr=0; $nr <pg_NumRows ($sth); $nr++) {