On Tue, Jul 20, 2010 at 9:58 PM, dennis skinner <dlsville@stripped>wrote:
>
>
> Hello I am a new mysql user. Can anyone tell me why this does not create
> a table?
>
> < ?php (the spaces before the question mark are not in the
> code)
> $dbuser="smeduser";
> $dbpassword="xxxxx";
> $dbname="smed";
> mysql_connect(localhost, $dbuser, $dbpassword);
> mysql_select_db($dbname) or die("unable to select database");
> $query="create table patnotes(patid int(9) not null unsigned, patnote
> int(6) not null unsigned auto_increment,
> parentid int not null unsigned, appuserid varchar(40) not null, subject
> varchar(100) not null,
> * body longtext not null),*
> primary key(patnote),
> unique id(patnote)";
> mysql_query($query);
> mysql_close();
> then the closing question mark and carat on this line this
> does not build a file and I am wondering what syntax I am missing here
> thanks dennis
>
In the above at the field "body" you have a close paranthesis, but I
couldn't find a open paranthesis anywhere. I had highlighted the field
above, pls check.
Regards,
Jay
MySQL DBA,
Datavail Corp.