Keys →
Functions ↓
function updateZip ( $x ) {#-k DB geo global $sq; # web-t1.gwilt $raw = debug_backtrace(); $sq['f'] = $raw[0]['function']; $sq['e'] = 0; $sq['err'] = ''; if ($sq['init'] < 2) { abend ( 'Calling ' . $sq['f'] . ' when DB not in RUN state.' ); } $q = 'UPDATE zipcode SET '; $q .= 'city = "'. $x['city'] . '",'; $q .= 'st = "' . $x['st'] . '",'; $q .= 'lat = "' . $x['lat'] . '",'; $q .= 'lon = "' . $x['lon'] . '",'; $q .= 'tz = "' . $x['tz'] . '",'; $q .= 'DST = "' . $x['DST'] . '",'; $q .= 'cc = "' . $x['cc'] . '" '; $q .= ' WHERE zip = "' . $x['zip'] . '"'; $q = str_replace ( '""', " ", $q ); # drop quoted null strings $sq['q'] = $q; $sq['dbin']++; if (!mysqli_query ( $sq['conn'], $q )) { # fail $err = mysqli_error( $sq['conn'] ); $sq['dbot']++; if (strlen($err)) { $sq['err'] = $err; $sq['e'] = 1; return $sq; } } $sq['dbup']++; return $sq; }?>