Created
March 6, 2012 09:59
-
-
Save Levik/1985421 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once 'login.php'; | |
| $db_server = mysql_connect($db_hostname, $db_username, $db_password); | |
| if (!$db_server) die ("Error: connect ". mysql_error()); | |
| mysql_select_db($db_database) | |
| or die("Error: database". mysql_error()); | |
| $query= "CREATE TABLE cats( | |
| id SMALLINT NOT NULL AUTO_INCREMENT, | |
| family VARCHAR (32) NOT NULL, | |
| name VARCHAR (32) NOT NULL, | |
| age TINYINT NOT NULL, | |
| PRIMARY KEY (id) | |
| )"; | |
| $result = mysql_query($query); | |
| if (!$result) die ("Error: access". mysql_error()); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment