Hello, newbie here. I have been developing for the web for years, but db'ing has never been my thing.
Its a Linux server running MySQL: 4.1
I have written a small script in PHP to create a table. (Now let me sideline this by saying I could use phpMyAdmin to create the table. but I would like to do this via script just so I can learn how)
I bring up the PHP script in a browser and it gives me no errors. When I check my database, there are no tables (STILL). What am I missing?
I declared the variables (user, hostname, password, and database) then coded the following:
[PHP]mysql_connect($hostname,$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="CREATE TABLE sellerInfo (sellerID int(8) NOT NULL auto_increment,userID varchar(12) NOT NULL,password varchar(12) NOT NULL,email varchar(34) NOT NULL,paypalEmail varchar(35) NOT NULL,companyName varchar(50) NOT NULL,firstName varchar(15) NOT NULL,lastName varchar(15) NOT NULL,streetAddress varchar(35) NOT NULL,city varchar(20) NOT NULL,state varchar(20) NOT NULL,country varchar(320) NOT NULL,postalCode varchar(10) NOT NULL,role varchar(10) NOT NULL,TOS varchar(3) NOT NULL,over18 varchar(3) NOT NULL,PRIMARY KEY (seller_ID),UNIQUE id (seller_ID),KEY id_2 (seller_ID))";
mysql_close();
[/PHP]