php-db | 2001041
Date: 04/11/01
- Next message: Paulson, Joseph V. \: "[PHP-DB] Connect to MySQL from different computer"
- Previous message: Brian Grayless: "[PHP-DB] Really Dumb Question..."
- In reply to: Brian Grayless: "[PHP-DB] Really Dumb Question..."
- Next in thread: CC Zona: "Re: [PHP-DB] Really Dumb Question..."
- Reply: CC Zona: "Re: [PHP-DB] Really Dumb Question..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> 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);
- Darryl
----------------------------------------------------------------------
Darryl Friesen, B.Sc., Programmer/Analyst Darryl.Friesen <email protected>
Education & Research Technology Services, http://gollum.usask.ca/
Department of Computing Services,
University of Saskatchewan
----------------------------------------------------------------------
"Go not to the Elves for counsel, for they will say both no and yes"
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Paulson, Joseph V. \: "[PHP-DB] Connect to MySQL from different computer"
- Previous message: Brian Grayless: "[PHP-DB] Really Dumb Question..."
- In reply to: Brian Grayless: "[PHP-DB] Really Dumb Question..."
- Next in thread: CC Zona: "Re: [PHP-DB] Really Dumb Question..."
- Reply: CC Zona: "Re: [PHP-DB] Really Dumb Question..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

