27,34 → 27,6 |
|
$value=array(); |
|
// cmc_mot_cle, cmc_id_mot_cle_utilisateur, cmc_id_parent |
|
|
/*$query0="SELECT \"racine_entite\" , MD5(\"racine_entite\"), MD5(\"000null\") ". |
" FROM cel_inventory WHERE 1 " ; |
|
$query1="SELECT DISTINCT id_location , MD5(CONCAT(id_location,\"racine_entite\")), MD5(\"racine_entite\") ". |
" FROM cel_inventory WHERE identifiant='".$DB->escapeSimple($uid[0])."' " . |
" ORDER BY id_location"; |
|
$query2="SELECT DISTINCT location , MD5(CONCAT(location,id_location)), MD5(CONCAT(id_location,\"racine_entite\")) ". |
" FROM cel_inventory WHERE identifiant='".$DB->escapeSimple($uid[0])."' " . |
" ORDER BY location"; |
|
$query3="SELECT DISTINCT lieudit, MD5(CONCAT(lieudit,location)), MD5(CONCAT(location,id_location)) ". |
" FROM cel_inventory WHERE identifiant='".$DB->escapeSimple($uid[0])."' " . |
" ORDER BY lieudit"; |
*/ |
/* |
$query4="SELECT DISTINCT station, MD5(station), MD5(lieudit) ". |
" FROM cel_inventory WHERE identifiant='".$DB->escapeSimple($uid[0])."' " . |
" ORDER BY station"; |
*/ |
|
//$query="(".$query0.") UNION (". $query1.") UNION (".$query2.") UNION (".$query3 .") UNION (".$query4 .")" ; |
|
//$query="(".$query0.") UNION (". $query1.") UNION (".$query2.") UNION (".$query3 .") " ; |
|
$query = 'SELECT DISTINCT id_location, location, lieudit, station FROM cel_inventory |
WHERE identifiant="'.$DB->escapeSimple($uid[0]).'" ORDER BY id_location ASC, location ASC, lieudit ASC, station ASC' ; |
|
71,14 → 43,12 |
$value[] = $row; |
} |
|
$json = new Services_JSON(); |
$output = $json->encode($value); |
$output = json_encode($value); |
|
print($output); |
|
return true; |
|
|
} |
|
|