Skip to content
This repository
Browse code

Slightly improve legacy decode ids

  • Loading branch information...
commit f412270079a521c597ad1bfdc31be9841b35afe5 1 parent 88985fe
authored October 06, 2005

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. 8  website/decodeids.inc
8  website/decodeids.inc
... ...
@@ -1,5 +1,5 @@
1 1
 <?php
2  
-# $Id: decodeids.inc,v 1.25 2005/10/05 17:25:17 goatchurch Exp $
  2
+# $Id: decodeids.inc,v 1.26 2005/10/06 11:31:38 theyworkforyou Exp $
3 3
 
4 4
 # The Public Whip, Copyright (C) 2005 Francis Irving and Julian Todd
5 5
 # This is free software, and you are welcome to redistribute it under
@@ -171,7 +171,11 @@ function decode_mpid_legacy($db)
171 171
     if ($bdebug == 1)
172 172
         print "<h1> FN=$first_name LN=$last_name CO=$constituency</h1>";
173 173
 
174  
-    $qwhere = "WHERE constituency = '$constituency'";
  174
+    $qwhere = "WHERE ";
  175
+    if ($constituency)
  176
+	    $qwhere .= "constituency = '$constituency'";
  177
+    else
  178
+	    $qwhere .= "1 = 1";
175 179
     if ($first_name != "")
176 180
         $qwhere .= " AND first_name = '$first_name' AND last_name = '$last_name'";
177 181
 

0 notes on commit f412270

Please sign in to comment.
Something went wrong with that request. Please try again.