Changeset 70 for oceandb/jQuery_Prototype/data
- Timestamp:
- Mar 5, 2009, 4:09:03 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oceandb/jQuery_Prototype/data/get_data.php
r68 r70 1 1 <? 2 2 require_once('../db-config/connect-mysql.php'); 3 $query = "SELECT data_type.serial AS type_id, maincase_new.owner_org, maincase_new.loc1_lon, maincase_new.loc1_lat FROM data_type, maincase_new, maincase_detail WHERE maincase_detail.maincase_id = maincase_new.serial AND maincase_detail.type_id = data_type.serial AND type_id =" . $_GET['type_id'] . " AND owner_org = '" . $_GET['owner_org'] . "' ORDER BY loc1_lon, loc1_lat";3 $query = "SELECT data_type.serial AS type_id, maincase_new.owner_org, maincase_new.loc1_lon, maincase_new.loc1_lat, maincase_new.description, maincase_new.website FROM data_type, maincase_new, maincase_detail WHERE maincase_detail.maincase_id = maincase_new.serial AND maincase_detail.type_id = data_type.serial AND type_id =" . $_GET['type_id'] . " AND owner_org = '" . $_GET['owner_org'] . "' ORDER BY loc1_lon, loc1_lat"; 4 4 if ($database_connect) mysql_select_db($database_connect) or die('USE '.$database_connect.' failed!'); 5 5 $result = mysql_query($query) or die("Query failed! $query"); … … 11 11 { 12 12 $col= mysql_fetch_row($result); 13 echo "{ \"type_id\" : " . $col[0] . ", \"owner_org\" : \"" . $col[1] . "\", \"loc1_lon\" : \"" . $col[2] . "\", \"loc1_lat\" : \"" . $col[3] . "\" },\n";13 echo "{ \"type_id\" : " . $col[0] . ", \"owner_org\" : \"" . $col[1] . "\", \"loc1_lon\" : \"" . $col[2] . "\", \"loc1_lat\" : \"" . $col[3] . "\", \"description\" : \"" . $col[4] . "\", \"website\" : \"" . $col[5] . "\"},\n"; 14 14 } 15 15 echo "]";
Note: See TracChangeset
for help on using the changeset viewer.