Curtin University of Technology
Skip to content
Link to Curtin homepage
Curtin  School of Biomedical Sciences
connect(); //establishes the connection // $biomed_db->select_db(); //selects the database } //Retrieve all unit outlines //$query = "select * from BIOMED_DOCUMENTS where category='staff_minutes' order by date_uploaded"; $query = "Select BD.display_title, BD.relative_path, C.category from BIOMED_DOCUMENTS BD, DOCUMENT_CATEGORY_TBL C "; $query .= "where BD.category=C.category_id and (C.category like '%Outlines%' or C.category like '%outlines%') "; $query .= "order by C.category, BD.display_title"; //echo "$query
\n"; if (!$biomed_db->query($query)) { echo "Query failed
"; exit; } if ($biomed_db->numRows()==0) { echo "

Unit Outlines

No records found

\n"; return; } $current_category = ""; $first=1; while ($row = $biomed_db->fetchObject()) { //change categories if you need to //echo "current category $current_category
row category " . $row->category ."
\n"; if (!($current_category == $row->category)) { $current_category = $row->category; //echo "changing category to $current_category
\n"; //the first category will not need a closing ul tag if (!$first) echo "\n"; else $first=0; echo "

$current_category

\n