diff options
author | prashantsinalkar | 2017-03-16 12:07:49 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-03-16 12:07:49 +0530 |
commit | 7dac6a0c8a779bbea6ff298e3c812ea1f3b1512a (patch) | |
tree | 6220dca121bb72c36d91a9485625a01f1791b704 | |
parent | 41bb83590304d757d570cb087822456fd9155055 (diff) | |
download | dwsim_flowsheet-7dac6a0c8a779bbea6ff298e3c812ea1f3b1512a.tar.gz dwsim_flowsheet-7dac6a0c8a779bbea6ff298e3c812ea1f3b1512a.tar.bz2 dwsim_flowsheet-7dac6a0c8a779bbea6ff298e3c812ea1f3b1512a.zip |
done some minor changes
-rwxr-xr-x | dwsim_flowsheet.module | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/dwsim_flowsheet.module b/dwsim_flowsheet.module index 7367edf..49067e6 100755 --- a/dwsim_flowsheet.module +++ b/dwsim_flowsheet.module @@ -932,16 +932,16 @@ function rrmdir($dir) function _dwsim_flowsheet_list_of_user_defined_compound($proposal_id) { $data = ""; - $query = db_select('dwsim_flowsheet_user_defined_compound'); - $query->fields('dwsim_flowsheet_user_defined_compound'); - $query->condition('proposal_id', $proposal_id, '='); - $query->orderBy('user_defined_compound', 'ASC'); - $user_defined_compound_list = $query->execute(); + //$query = db_select('dwsim_flowsheet_user_defined_compound'); + //$query->fields('dwsim_flowsheet_user_defined_compound'); + //$query->condition('proposal_id', $proposal_id, '='); + //$query->orderBy('user_defined_compound', 'ASC'); + $user_defined_compound_list = db_query("SELECT * FROM dwsim_flowsheet_user_defined_compound WHERE proposal_id = :proposal_id", array(":proposal_id" => $proposal_id)); $headers = array( - "User defined compound", + "List of user defined compounds used in process flowsheet", "CAS No." ); - if($user_defined_compound_list->fetchObject()){ + if($user_defined_compound_list){ $rows = array(); while ($row = $user_defined_compound_list->fetchObject()) { @@ -951,6 +951,7 @@ function _dwsim_flowsheet_list_of_user_defined_compound($proposal_id) ); array_push($rows, $item); } //$row = $user_defined_compound_list->fetchObject() + $data .= theme('table', array( 'header' => $headers, 'rows' => $rows |