creating mysql table

From: Date: Sat, 30 Sep 2000 17:10:10 +0000
Subject: creating mysql table
Groups: php.general 
Request: Send a blank email to php-general+get-18165@lists.php.net to get a copy of this message
I'm having trouble creating a table in Mysql. Can someone please tell me whats wrong with this code. <? mysql_connect("localhost", "user", "password") or die ("Unable to connect to database"); $result = mysql_list_dbs(); while ($row = mysql_fetch_object($result)) { echo $row->Database . "\n"; } $query = "CREATE TABLE registration ( first_name VARCHAR(30), last_name VARCHAR(30), email VARCHAR(50), organization VARCHAR(50), street VARCHAR(50), city VARCHAR(30), state VARCHAR(30), zip INT(5) ZEROFILL, country VARCHAR(50), home_phone VARCHAR(14), bus_phone VARCHAR(14), how_found_aibo VARCHAR(30), receive_info VARCHAR(3), how_receive_info VARCHAR(30), seen_aibo VARCHAR(3), where_seen_aibo VARCHAR(30), gender VARCHAR(1), age INT(3), occupation VARCHAR(30), comp_preference VARCHAR(3), id INT PRIMARY KEY NOT NULL AUTO_INCREMENT) )"; mysql_db_query("aibo", $query) or die ("Unable to create registration table") ; ?> I get the following output: aibo binary_data brian ef_01 ef_02 itfirm jabb jabb1 mambo mysql test users Unable to create registration table Thanks __________________________________________________ Do You Yahoo!? Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free! http://photos.yahoo.com/

« previous php.general (#18165) next »