The Weyer Database


"; print "
Author Publication Subject Volume Year
Search:
Select search criteria
"; } else { $sql="select * from weyer"; if(!($name)) { } else { $sql= "$sql where AUTHORS LIKE '%$name%'"; } if(!($pub)) { } elseif(!($name)) { $sql = "$sql where PUB LIKE '%$pub%'"; } else { $sql = "$sql and PUB LIKE '%$pub%'"; } if(!($subject)) { } elseif(!($name) and !($pub)) { $sql= "$sql where SUBJECT LIKE '%$subject%'"; } else { $sql = "$sql and SUBJECT LIKE '%$subject%'"; } $sql = "$sql ORDER BY YEAR DESC"; $conn=mysql_connect('localhost','arctic',''); if(!mysql_select_db('arcticcircle',$conn)){echo ("Cannot select database.\n");} if (!($result=mysql_query($sql,$conn))) { echo ("Error selecting data from test table.\n"); } else { $total = mysql_numrows($result); while ( ($data=mysql_fetch_row($result) ) ) { ?>
[] $data[2]
[Language: $data[1]]$data[3]$data[4]$data[5]\n\n"; } } mysql_close($conn); print "There were $total row(s) that match "; if (!($name)) { } else { print "author = \"$name\""; } if (!($pub)) { } else { print " publication = \"$pub\""; } if (!($subject)) { } else { print " subject = \"$subject\""; } print ".

"; } ?>