$auction->setSellerUserName($row['username']); $auction->setSellerDisplayName($row['displayname']); } } $bid_query = mysqli_query($link, "SELECT * FROM bids WHERE auction_id={$auction->getAuctionId()}"); $highest_bid = 0.0; if ($bid_query !== null) { while ($row = mysqli_fetch_array($bid_query)) { if ($highest_bid < $row['bid_amount']) { $highest_bid = $row['bid_amount']; } } } $textbook = null; //Check to see if ISBN 10/13 is set for the textbook being offered for sale (Should either always return a result or have no result) if (!empty($auction->getISBN()) && $auction->getISBN() !== null) { $textbook_query = null; if (strlen($auction->getISBN()) === 10) { $textbook_query = mysqli_query($link, "SELECT * FROM textbooks WHERE ISBN_v10='ISBN-10:{$auction->getISBN()}'"); } else { // length of 13 for ISBNv13 $textbook_query = mysqli_query($link, "SELECT * FROM textbooks WHERE ISBN_v13='ISBN-13:{$auction->getISBN()}'"); } if ($textbook_query != null) { $textbook = null; while ($row = mysqli_fetch_array($textbook_query)) { $textbook = $row; } } } $_SESSION['AUCTION_TEXTBOOK'] = $textbook;