Commit 5a70ad5f authored by Sorrel Harriet's avatar Sorrel Harriet
Browse files

ongoing work on lab 8 script

parent f8f194d9
......@@ -14,9 +14,13 @@ mysqli_query($link, 'START TRANSACTION');
// fetch the albums so that we have access to their names and upc's
// lock in shared mode so affected data cannot be altered by other
// sessions BEFORE the transaction is committed or rolled back
// sessions BEFORE the transaction is committed or rolled back.
// only list albums that are in stock.
$sql = "SELECT title, upc
FROM Album
INNER JOIN Inventory
ON Album.upc=Inventory.album_upc
WHERE Inventory.stock>0
ORDER BY title LOCK IN SHARE MODE";
$result = mysqli_query($link, $sql);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment