Compound Search:

Enter The Compound Name :




ADVANCED SEARCH "; echo "Go Back"; } else { // Connect to the database $dServer = "localhost:3306"; $dDb = "neem_database"; $dUser = "root"; $dPass = "vmsrf"; $s = @mysql_connect($dServer, $dUser, $dPass) or die("Couldn't connect to database server"); @mysql_select_db($dDb, $s) or die("Couldn't connect to database"); for($i = 0; $i < sizeof($arrWords); $i++) { $query = "select VMSRF_Id from compound where Compound_Name like '%{$arrWords[$i]}%'"; //echo $query; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { // Get the id's of the compound extract($row); // echo $row[0]; $arrIds = explode(",", $row[0]); $arrWhere = implode(" OR VMSRF_Id = ", $arrIds); $aQuery = "select VMSRF_Id,Compound_Name from compound where VMSRF_Id = ". $arrWhere; $aResult = mysql_query($aQuery); $count = 0; $compound = array(); if(mysql_num_rows($aResult) > 0) { if($aRow = mysql_fetch_array($aResult)) { $compound[$count] = array ( "VMSRF_Id" => $aRow["VMSRF_Id"], "Common_Name" => $aRow["Compound_Name"], "summary" => $aRow["summary"]); $count++; } } foreach($compound as $a => $value) if(isset($compound)) { $compound = array_unique($compound); //echo "" . sizeof($compound); // echo (sizeof($compound) == ? " Compound" : " compound"); // echo " found:"; echo "$compnu"; { ?> ">

"; echo "Go Back"; } } ?>