In article <00c701c0c2af$be478f40$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Darryl Friesen") wrote:

> > How do I create a table within my PHP? Heres what I currently have, but I
> > keep getting parse error on the "create" line...
> Because create is not a valid PHP command.  You have to assign the create
> statement to a string, _then_ pass the string to mysql_query:
> $sql = "create table $propTable (
>   ID int not null auto_increment primary key,
>   TourName tinytext,
>   TourTitle tinytext,
>   ViewTitle tinytext,
>   TourNum tinyint not null,
>   Applet tinyint not null,
>   Desc text,
>   TourPath text,
>   SmFile text,
>   LgFile text );
> ";
> $result = mysql_query($sql);

And take out the semicolon immediately after the closing parenthesis in 
"LgFile text )".   :-)


PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to