Keys →
Functions ↓
function addTzone ( $x ) {#-k DB geo# $x is timezone array to add global $sq; $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.' ); } $sq['sndr'] = ''; $q = "INSERT INTO tzone ( tz, cc, lat, lon, standard, summer, comments ) VALUES ('"; $q .= $x['tz'] . "','"; $q .= $x['cc'] . "','"; $q .= $x['lat'] . "','"; $q .= $x['lon'] . "','"; $q .= $x['standard'] . "','"; $q .= $x['summer'] . "','"; $q .= $x['comments']; $q .= "')";# $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'] = mysqli_errno ( $sq['conn'] ); return $sq; } } $sq['dbup']++; return $sq; }?>