hey all,
I’m trying to add a table to an existing database using php. This is what i’ve come up with:
<?php
$dbh=mysql_connect ("localhost", "townfre_clients", "password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db("townfre_connecticut");
$sql= ("CREATE TABLE 'newhaven'(
ID tinyint( 4 ) NOT NULL AUTO_INCREMENT ,
name varchar( 50 ) ,
email varchar( 255 ) ,
PASSWORD varchar( 50 ) ,
address varchar( 200 ) ,
phone varchar( 50 ) ,
link varchar( 250 ) ,
renew varchar( 50 ) ,
short varchar( 75 ) ,
town varchar( 50 ) ,
coupon1 varchar( 200 ) ,
c1count varchar( 200 ) ,
coupon2 varchar( 200 ) ,
c2count varchar( 200 ) ,
coupon3 varchar( 200 ) ,
c3count varchar( 200 ) ,
category varchar( 50 ) ,
PRIMARY KEY ( id ) ,
UNIQUE id( id )
)");
?>
However, its not working, and the only error message i have received is that the user townfre_ does not have permission . It doesn’t say townfre_clients just townfre_ . I’ve set the permission for townfre_clients to all privledges. Any ideas?
Thanks
Mat