From cc350ddd39df7b9edb377bd2e937a90554ec08c8 Mon Sep 17 00:00:00 2001 From: Sorrel Harriet <sharr003@igor.gold.ac.uk> Date: Fri, 4 Nov 2016 15:30:42 +0000 Subject: [PATCH] removing old artist script --- lab-5/music-store-app/artist.php | 35 -------------------------------- 1 file changed, 35 deletions(-) delete mode 100755 lab-5/music-store-app/artist.php diff --git a/lab-5/music-store-app/artist.php b/lab-5/music-store-app/artist.php deleted file mode 100755 index f50a022..0000000 --- a/lab-5/music-store-app/artist.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -/* connect to the database */ -$link = mysqli_connect( - 'localhost', - 'YOUR_USERNAME', - 'YOUR_PASSWORD', - 'YOUR_DB_NAME' -); - -/* check connection succeeded */ -if (mysqli_connect_errno()) { - exit(mysqli_connect_error()); -} - -/* fetch a result set */ -$sql = "SELECT first_name, last_name FROM artist"; -$result = mysqli_query($link, $sql); - -/* check query returned a result */ -if ($result === false) { - echo mysqli_error($link); -} else { - /* fetch associative array */ - while ($row = mysqli_fetch_assoc($result)) { - echo($row['first_name']." (".$row['last_name'].") "); - } - /* free result set */ - mysqli_free_result($result); -} - -/* close the connection to the database */ -mysqli_close($link) - -?> \ No newline at end of file -- GitLab