Learning Mysql



Download 4.24 Mb.
View original pdf
Page363/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   358   359   360   361   362   363   364   365   366
Learning MySQL
400 | Chapter 13:
Web Database Applications

In response, the web server returns an HTTP header, and then the requested resource if the request is satisfied. Continuing the example, the server looking after http://www
.invyhome.com returns the following response:
HTTP/1.1 200 OK
Date: Wed, 02 Aug 2006 14:55:15 GMT
Server: Apache (Mandriva Linux/PREFORK-1mdv2007.0)
Last-Modified: Tue, 27 Jul 2006 18:27:45 GMT
ETag: "3fc424-1e5-be72aa40"
Accept-Ranges: bytes
Content-Length: 1485
Content-Type: text/html
X-Pad: avoid browser bug "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html401/loose.dtd">



Artists


Artists







artist_idartist_name


?>

Enter your name

404 | Chapter 13:
Web Database Applications



Artists







// Connect to the MySQL server if (!($connection = @ mysql_connect("localhost", "root",
"the_mysql_root_password")))
die("Cannot connect");
if (!(mysql_select_db("music", $connection)))
die("Couldn't select music database Run the query on the connection if (result = @ mysql_query("SELECT * FROM artist, $connection)))
die("Couldn't run query Until there are no rows in the result set, fetch a row into the row array and while (row = @ mysql_fetch_array($result, MYSQL_ASSOC))
{
// Start a table row print "\n";
artist_idartist_name

Download 4.24 Mb.

Share with your friends:
1   ...   358   359   360   361   362   363   364   365   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page