num_rows==0) return 'unknown'; // mysqli seek to the row of the given dataset $result->data_seek($row); // mysqli assign the rows data to an array $row_result=$result->fetch_assoc(); // assign field of the row to the return variable $field_result=$row_result[$field]; // done, return result return $field_result; } // End Function Definitions //====================================================== //====================================================== // Host Determination Section // test for the existance of a small text file to determine whether // or not your on the local machine (where the file IS), or on the // remote site (where the file IS NOT). This test chooses the correct // database login info file. $info_test_file ="../../php/info_test.txt" ; // set indiicator for whether we are on local or remote machine $in_local_dir = 0 ; if (file_exists($info_test_file)) { include("../../php/dbinfo_dbf.inc.php"); $in_local_dir = 1 ; //echo "File test does exist" ; //echo "

" ; } else { include("../../php/dbinfo_addr.inc.php"); $in_local_dir = 0 ; //echo "File test does NOT exist" ; } ; // End Host Determination Section //============================================= //============================================= // Database MySqli Connection Section // this database connection needs to be copied $db_eatc7402 = new mysqli($DBHost, $DBUser, $DBPass); if($db_eatc7402->connect_errno > 0){ die(' Unable to connect to MYSQLI database [' . $db_eatc7402->connect_error . ']

'); } else { if ($DEBUG3 == "on") echo "Connected to MYSQLI server successfully

" ; } // end if connect error /* change db to eatc7402 db */ if($db_eatc7402->select_db($DBName) > 0){ if ($DEBUG3 == "on") echo " Connected to MYSQLI database name successfully

" ; } else { die(' Unable to connect to MYSQLI database name [' . $db_eatc7402->connect_error . ']

'); } // end if debug // End Database Connection Section //=========================================================== //=========================================================== // Run Query Section // // NOTE; DO NOT TEST FOR 'True' or 'False' flagd, use 0 or 1 // true or false wil work on local server but will FAIL // when used on the ADDR unix machine!!! USE 1 or 0 // determine the directory we are operating in to // determine the query to run and many other location // sopecific variables in the code // get the current directory $working_dir = getcwd() ; //echo $working_dir ; //echo "
" ; // set var to null to initiate $directory_in_use = "" ; // determine which dir are in and set $directory_in_use to indicate if ($in_local_dir) { if ($pos = strripos($working_dir, 'data_templates')) { //echo "We found the ('data_templates') in ($working_dir) at position ($pos)"; //echo "
" ; $directory_in_use = "data_templates" ; } if ($pos = strripos($working_dir, 'St_Paul')) { //echo "We found the ('St_Paul') in ($working_dir) at position ($pos)"; //echo "
" ; $directory_in_use = "st_paul" ; } if ($pos = strripos($working_dir, 'Minneapolis')) { //echo "We found the ('Minneapolis') in ($working_dir) at position ($pos)"; //echo "
" ; $directory_in_use = "minneapolis" ; } } else { if ($pos = strripos($working_dir, 'station_templates')) { //echo "We found the last ('station_templates') in ($working_dir) at position ($pos)"; //echo "
" ; $directory_in_use = "station_templates" ; } if ($pos = strripos($working_dir, 'Minneapolis')) { //echo "We found the ('Minneapolis') in ($working_dir) at position ($pos)"; //echo "
" ; $directory_in_use = "minneapolis" ; } } // for debug //echo "Directory in use is $directory_in_use " ; //echo "

" ; // for debug //$directory_in_use = "data_templates" ; //$directory_in_use = "st_paul" ; //$directory_in_use = "minneapolis" ; //============================================ switch ($directory_in_use) { case "data_templates" : $query= "SELECT * FROM stp_motor_app_table_addr stp_motor_app_table_addr ORDER BY stp_motor_app_table_addr.ID ASC" ; echo "
" ; // do not comment out this break!!! break ; case "st_paul" : $query= "SELECT * FROM stp_motor_app_table_addr stp_motor_app_table_addr ORDER BY stp_motor_app_table_addr.ID ASC" ; echo "
" ; // do not comment out this break!!! break ; case "minneapolis" : $query= "SELECT * FROM mfd_motor_app_table_addr mfd_motor_app_table_addr ORDER BY mfd_motor_app_table_addr.UniqueID ASC, mfd_motor_app_table_addr.Sort_assign_order ASC" ; echo "
" ; // do not comment out this break!!! break ; /*case "minneapolis" : $query= "SELECT * FROM mfd_motor_app_table_addr_query_new mfd_motor_app_table_addr_query_new ORDER BY mfd_motor_app_table_addr_query_new.ID ASC, mfd_motor_app_table_addr_query_new.Sort_assign_order ASC" ; echo "
" ; // do not comment out this break!!! break ;*/ } //================================================ /* Select queries return a resultset */ if ($result = $db_eatc7402->query($query)) { $num_of_rows = $result->num_rows ; if ($DEBUG3 == 'on') { echo "Select MYSQLI query returned $num_of_rows rows.

" ; } } // Check result // This shows the actual query sent to MySQL, and the error. Useful for debugging. if ($DEBUG3 == 'on') { if (!$result) { $message = 'Invalid query!!:
' . mysqli_error($db_eatc7402) . '
'; $message .= 'Whole query: ' . $query; die($message); } } $num = $num_of_rows; // phpinfo() ; if (is_null($num)) { $num = "0"; } ; //echo "Your query returned $num rows"; //echo "

"; // End Run Query Section //========================================================= ?>
    

 
Minneapolis Motorized Fire Apparatus

An underlined and "starred" ID field indicates a linked photo.

You may search this table with the form at the BOTTOM of this page.

Comments or Questions?  Visit Our USERS FORUM


 


ID Year Rig Make/Fabric Cab GPM Tank Aer Type Serial# Miscellaneous Shop# Assignment
/active/.htm#PIC_ID" target="_blank"> * /former/.htm#PIC_ID" target="_blank"> *
ID Year Rig Make/Fabric Cab GPM Tank Aer Type Serial# Miscellaneous Shop# Assignment

This table is live on-line and may be searched using the form below


Query Samples and Help

1. Select a table column, your desired operation, and the text to search for.

(Select field)
is LIKE (% for wildcard) 
= (equals)   greater than     less than
greater than or equal to   less than or equal to
NULL (empty)  NOT NULL
(Enter text if needed)
NOT (check if desired)
Sort by --
(Select field or Blank)

Ascend Descend

  You MUST also select how you would like to join your selections together (And/Or).
Or    And    No second field chosen

2. Select an additional table column, your desired operation, and the text to search for.

(Select field)
is LIKE (% for wildcard) 
= (equals)   greater than     less than
greater than or equal to   less than or equal to
NULL (empty)  NOT NULL
(Enter text if needed)
NOT (check if desired)

  You MUST also select how you would like to join your selections together (And/Or).
Or    And    No third field chosen

3. Select an additional table column, your desired operation, and the text to search for.

(Select field)
is LIKE (% for wildcard) 
= (equals)   greater than     less than
greater than or equal to   less than or equal to
NULL (empty)  NOT NULL
(Enter text if needed)
NOT (check if desired)

   
Query Samples and Help


Comments or Questions?  Visit Our USERS FORUM
 


Valid XHTML 1.0 Transitional


Copyright © 2006-2013, The Extra Alarm Association
of The Twin Cities, Inc.
All Rights Reserved
Last Modified
mailto: eaatc.web@gmail.com

-- [HOME] --