Chemical Entity Data Page

\r\n"; } $common_name = $contentCN; ////////////////////////////////////////////////count LHS rxn and generate text $queryLHS = "SELECT rxn_id AS numrows FROM data_07 WHERE LHS1_id =".$_GET['id']." OR LHS2_id =".$_GET['id']." OR LHS3_id =".$_GET['id']." OR LHS4_id =".$_GET['id']." OR LHS5_id =".$_GET['id']; $resultLHS = mysqli_query($conn, $queryLHS) or die('Error : ' . mysqli_error()); $countLHS = mysqli_num_rows($resultLHS); if($countLHS > 1) $LHScount_txt = $countLHS." Reactions utilise:
".$common_name; elseif($countLHS == 1) $LHScount_txt = $countLHS." Reaction utilises:
".$common_name; else $LHScount_txt = ""; //////////////////////////////////////////////count RHS rxn and generate text $queryRHS = "SELECT rxn_id AS numrows FROM data_07 WHERE RHS1_id =".$_GET['id']." OR RHS2_id =".$_GET['id']." OR RHS3_id =".$_GET['id']." OR RHS4_id =".$_GET['id']." OR RHS5_id =".$_GET['id']." OR RHS6_id =".$_GET['id']; $resultRHS = mysqli_query($conn, $queryRHS) or die('Error : ' . mysqli_error()); $countRHS = mysqli_num_rows($resultRHS); if($countRHS > 1) $RHScount_txt = $countRHS." Reactions form:
".$common_name; elseif($countRHS == 1) $RHScount_txt = $countRHS." Reaction forms:
".$common_name; else $RHScount_txt = ""; //////////////////////////////////////////////// Find Entity info $query03 = "SELECT * FROM data_03 WHERE entity_id = ".$_GET['id']; $result03 = mysqli_query($conn, $query03) or die('Error : ' . mysqli_error()); while($row = mysqli_fetch_assoc($result03)) { $charge = $row['charge']; $reality = $row['reality']; $transient = $row['transient']; $txt_gen = $row['txt_gen']; $txt_mwt = $row['txt_mwt']; $wikipedia = $row['wikipedia']; $TXT_structure = $row['TXT_structure']; } if($charge == -10) {$chargeTXT = "Charge = ".$charge;} elseif($charge == -9) {$chargeTXT = "Charge = ".$charge;} elseif($charge == -8) {$chargeTXT = "Charge = ".$charge;} elseif($charge == -7) {$chargeTXT = "Charge = ".$charge;} elseif($charge == -6) {$chargeTXT = "Charge = ".$charge;} elseif($charge == -5) {$chargeTXT = "Charge = ".$charge;} elseif($charge == -4) {$chargeTXT = "Charge = ".$charge;} elseif($charge == -3) {$chargeTXT = "Charge = ".$charge;} elseif($charge == -2) {$chargeTXT = "Charge = ".$charge;} elseif($charge == -1) {$chargeTXT = "charge = ".$charge;} elseif($charge == 0) {$chargeTXT = "";} elseif($charge == 1) {$chargeTXT = "Charge = +".$charge;} elseif($charge == 2) {$chargeTXT = "Charge = +".$charge;} elseif($charge == 3) {$chargeTXT = "Charge = +".$charge;} elseif($charge == 4) {$chargeTXT = "Charge = +".$charge;} elseif($charge == 5) {$chargeTXT = "charge = +".$charge;} elseif($charge == 6) {$chargeTXT = "Charge = +".$charge;} elseif($charge == 7) {$chargeTXT = "Charge = +".$charge;} elseif($charge == 8) {$chargeTXT = "Charge = +".$charge;} elseif($charge == 9) {$chargeTXT = "Charge = +".$charge;} elseif($charge == 10) {$chargeTXT = "Charge = +".$charge;} else {$chargeTXT = "";} if (($reality == "Real") AND ($charge == 0) AND ($transient == NULL)) {$type_txt = "Real, long lived, electronically neutral reagent chemical.";} if (($reality == "Real") AND ($charge == 0) AND ($transient == 1)) {$type_txt = "Real, short lived (transient), electronically neutral species.";} if (($reality == "Real") AND ($charge != 0)) {$type_txt = "Real ion.";} if (($reality == "Generic") AND ($charge == 0)) {$type_txt = "Electronically neutral generic.";} if (($reality == "Generic") AND ($charge != 0)) {$type_txt = "Generic ion.";} if (($reality == "Super-Generic")) {$type_txt = "Special class of generic used to represent \"generic chemical reactivity behaviour\" rather than structure.";} if (($reality == "AS/A2 generic")) {$type_txt = "Belongs to a sub-set of generics specific to the British A-Level exam system.";} if (($reality == "VSEPR")) {$type_txt = "Valence shell electron pair repulsion (VSEPR) structural generic.

Learn about VSEPR theory and test your knowledge on the Chemistry Tutorials & Drills web site.

There is an excellent and comprehensive Molecular Structure Explorer on the web.";} if (($reality == "Bio-Generic")) {$type_txt = "Molecular biology generic.";} if (($reality == "Apparatus")) {$type_txt = "Apparatus: an essential component of physical experimentation.";} if (($reality == "Pharmaceutical Class")) {$type_txt = "Class of pharmaceutical.";} if (($reality == "Biological")) {$type_txt = "Real biological entity.";} if (($reality == "Real mineral")) {$type_txt = "Minerals with the same name may vary widely in appearance and composition, and very few are >99% (reagent grade) pure.";} if (($reality == "Commercial")) {$type_txt = "Commercial product likely to contain propriety (non-disclosed) ingredients and additives.";} if (($reality == "Physics")) {$type_txt = "Entity associated with particle physics and elementary particle interactions.";} //echo $type_txt; //////////////////////////////////////////////// Find Reagent data $queryREAG = "SELECT * FROM data_05 WHERE entity_id = ".$_GET['id']; $resultREAG = mysqli_query($conn, $queryREAG) or die('Error : ' . mysqli_error()); while($row = mysqli_fetch_assoc($resultREAG)) { $mp = $row['mp']; $mp_info = $row['mp_info']; $bp = $row['bp']; $bp_info = $row['bp_info']; $density = $row['density']; $purity = $row['purity']; $purity_info = $row['purity_info']; $available = $row['available']; $solubility = $row['solubility']; $sol_units = $row['sol_units']; $org_sol = $row['org_sol']; $absorb = $row['absorb']; $lamda_max = $row['lamda_max']; } ////////////////////////////////////////////// Calculate entity mass $queryMASS = "SELECT SUM(mass * stoich) AS entity_mass FROM data_14, data_13 WHERE entity_id = ".$_GET['id']." AND atom = symbol GROUP BY entity_id"; $resultMASS = mysqli_query($conn, $queryMASS) or die('Error : ' . mysqli_error()); while($rowMASS = mysqli_fetch_array($resultMASS)) { list($entity_mass) = $rowMASS; $contentMASS .= "$entity_mass
\r\n"; } $MASS = $contentMASS; If ($MASS > 0 AND $txt_mwt != "% composition %" AND $txt_mwt != "polymer with estimated composition") {$MASS_txt = "Gram formula weight (molecular mass) = ".substr($MASS, 0, 6);} ?>