September 2001
Intermediate to advanced
768 pages
32h 45m
English
The following examples are based on this simple table:
CREATE TABLE user ( id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, login CHAR (16) NOT NULL, password CHAR (16) NOT NULL, PRIMARY KEY (id)); )
Many of the examples use this include file:
<?php
// filename 'mysql_connect.inc.php'
// Connect to a MySQL server and select a database
$host = 'localhost';
$user = '';
$pass = '';
$db = 'some_db';
$mysql_link = mysql_pconnect ($host, $user, $pass)
or die ("Could not connect to the MySQL server
located at '$host' as user '$user'.");
mysql_select_db ($db, $mysql_link)
or die ("Could not set database '$db' as the active database.");
?> Read now
Unlock full access