Place your query in a string variable, like $sSql, and use the mysql_query command to execute the query. For example:
$sSql="CREATE TABLE test (id TINYINT not null AUTO_INCREMENT, process LONGTEXT not null , title LONGTEXT not null , description LONGTEXT not null , PRIMARY KEY (id))"; if (!mysql_query($sSql)) die ("Could not create table"); At 02:57 PM 10/28/2001, Saulius Jankauskas wrote: >Hello all. > >I am trying to create simple test table with php, but I get: > >Parse error: parse error in /home/vanesaw/public_html/create.php on line 5 > >Line 5 is command to create table (see code below). > >Whats wrong with it? Thanks. >------------ ><? >$sql = mysql_connect("host", "login", "pass"); >mysql_select_db("dbname"); > >CREATE TABLE test (id TINYINT not null AUTO_INCREMENT, process LONGTEXT not >null , title LONGTEXT not null , description LONGTEXT not null , PRIMARY KEY >(id)); > >?> >done > > > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] Sliante, Richard S. Crawford http://www.mossroot.com mailto:[EMAIL PROTECTED] AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford "It is only with the heart that we see rightly; what is essential is invisible to the eye." --Antoine de Saint Exupéry "Push the button, Max!" -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]