Re: create table with php -whats wrong?

From: Date: Sun, 28 Oct 2001 22:46:09 +0000
Subject: Re: create table with php -whats wrong?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13788@lists.php.net to get a copy of this message
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: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
Sliante, Richard S. Crawford http://www.mossroot.com mailto:rscrawford@mossroot.com 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!"

« previous php.db (#13788) next »