Just somewhere to keep my notes while I'm playing.

Friday, June 5, 2009

And here is the Artists table:


<?php
echo "<html><head><title>Artists</title></head>";
echo "<body>";
echo "<h1>Artists in my CD Collection</h1>";
echo "<ol>\n";
$con = mysql_connect("localhost","timj","xxxxx");
if (!$con) {
die('Could not connect: ' . mysql_error());
}

mysql_select_db("cddb", $con);

$result = mysql_query("SELECT name FROM artist order by name");
while ($row = mysql_fetch_array($result)) {
echo "<li>\n";
echo $row['name'] ;
echo "</li>\n";
}
mysql_free_result($result);
mysql_close($con);
echo "</ol>";
echo "</body>";
echo "</html>";
?>


Pretty much the same as the Publishers screen.

No comments: