Date: 09/30/00
- Next message: Richard Creech: "Re: [PHP] How to improve sql query security using php?"
- Previous message: Mitchell Hagerty: "[PHP] example of: gethostbyaddr, gethostbyname?"
- Next in thread: Andrew Braund: "RE: [PHP] creating mysql table"
- Reply: Andrew Braund: "RE: [PHP] creating mysql table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Richard Creech: "Re: [PHP] How to improve sql query security using php?"
- Previous message: Mitchell Hagerty: "[PHP] example of: gethostbyaddr, gethostbyname?"
- Next in thread: Andrew Braund: "RE: [PHP] creating mysql table"
- Reply: Andrew Braund: "RE: [PHP] creating mysql table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

