Hello. I have a simply php script for my school project that checks books back into a library database. What I was trying to accomplish was when you checked in the book for it to check and see if the book has been requested and notify the librarian that there is someone waiting for the book. I thought it was working fine but if my query of the request table returns an empty set things seem to stall.

		@mysql_connect($_SESSION['hostname'],$_SESSION['username'],$_SESSION['password']) or die(mysql_error());
		$libraryID = $_POST['libraryID'];
		$query="update checkout set checkinDate = CURDATE() where libraryID = '$libraryID'";
		$result=mysql_query($query) or die(mysql_error());
		$query = "SELECT status FROM holdsrequests WHERE libraryID = '$libraryID'";
		$result = mysql_query($query) or die(mysql_error());
		$number = mysql_numrows($result) or die(mysql_error());
		if($number > 0){
			$row = mysql_fetch_array($result) or die(mysql_error());
			$status = $row['status'];
			if($status == "request"){
				$_SESSION['held'] = $row['cardNumber'];

If I take out the $number variable and all reference to it the code works fine. But with it there it simply stops working. I don't get any errors just a blank page. I added in some print statements to see where it was failing and it seems that anything after the $number variable is not getting executed.

and nevermind, the or die statement I had after the $number was messing things up. All fixed now/