Search the Works List

\n"; if($keyword) { $add_keyword="AND durante_repertoire.title like '%$keyword%'"; } if($action=="search") { if($section_on=="ON") { $add1="AND durante_repertoire.repertoire_heading_ID='$repertoire_heading_ID2'"; } if($collection_on=="ON") { $collection2=eregi_replace(" ","-",$collection2); $add2="AND durante_repertoire.collection LIKE '%$collection2%'"; } if($forces_on=="ON") { $add3="AND durante_repertoire.forces LIKE '%$forces2%'"; } $result=mysql_query(" SELECT * FROM durante_repertoire_heading, durante_repertoire WHERE durante_repertoire_heading.repertoire_heading_ID=durante_repertoire.repertoire_heading_ID AND durante_repertoire_heading.composer_ID='3' $add_keyword $add1 $add2 $add3 GROUP BY durante_repertoire.repertoire_heading_ID ORDER BY durante_repertoire_heading.repertoire_heading_ID "); $rows=mysql_num_rows($result); if(!$rows) { print "There are no records matching your search criteria, please try again

"; } else { print "Below are your search results

"; while(list($repertoire_heading_ID,$composer_ID,$repertoire_heading)=mysql_fetch_row($result)) { print "

$repertoire_heading

"; print ""; $works=mysql_query(" SELECT * FROM durante_repertoire WHERE title LIKE '%$keyword%' AND repertoire_heading_ID='$repertoire_heading_ID' $add1 $add2 $add3"); while(list($repertoire_ID,$repertoire_heading_ID,$poo,$title,$forces,$collection,$comments,$autograph)=mysql_fetch_row($works)) { $title=ereg_replace("XX","'",$title); if($keyword) { $title=ereg_replace("$keyword","$keyword",$title); } $title=eregi_replace("XX","'",$title); $comments=eregi_replace("XX","'",$comments); $forces=eregi_replace("vv"," voices",$forces); $forces=eregi_replace("SA solo","S and/or A solo",$forces); if($collection_on=="ON") { $collection=ereg_replace("$collection2","$collection2",$collection); } print ""; } print "
TITLE FORCES COLLECTION ADDITIONAL
$title $forces $collection $comments
"; } } print "

Try again?

"; include("search_works_form.htm"); } else { include("search_works_form.htm"); } include("footer.htm"); ?>