Changeset 586
- Timestamp:
- Oct 4, 2007, 7:08:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/npemap.org.uk/cgi/geocoder.fcgi
r461 r586 141 141 my ($easting,$northing,$matched,$pc); 142 142 my ($outward,$inward) = ($request{outward},$request{inward}); 143 sleep 5; 143 144 144 145 # Work out until we find a match 145 146 ($easting,$northing,$matched,$pc) = execute_ptl($full_matcher,$outward,$inward); 147 148 # Ensure the search worked, and the db isn't broken 149 unless(defined $easting) { 150 warn("Search failed to execute, is the database server down?"); 151 ($full_matcher,$postcode_matcher,$pc_area_matcher) = (undef,undef,undef); 152 print_internal_err('Error setting up database connection'); 153 next REQUEST; 154 } 155 156 # Keep looking for a match 146 157 unless($matched) { 147 158 ($easting,$northing,$matched,$pc) = … … 260 271 my ($easting,$northing,$matched,$pc); 261 272 262 $matcher->execute(@args); 273 my $res = $matcher->execute(@args); 274 # Should have got something back, unless it's broken 275 unless(defined $res) { 276 warn("Nothing received from execute, is the connection open?"); 277 return undef; 278 } 279 263 280 while( my @row = $matcher->fetchrow_array ) { 264 281 ($easting,$northing,$matched,$pc) = @row; … … 275 292 my @results; 276 293 277 $matcher->execute(@args); 294 my $res = $matcher->execute(@args); 295 # Should have got something back, unless it's broken 296 unless(defined $res) { 297 warn("Nothing received from execute, is the connection open?"); 298 return undef; 299 } 300 278 301 while( my @row = $matcher->fetchrow_array ) { 279 302 my %res = (
Note: See TracChangeset
for help on using the changeset viewer.