Re: create tables in mysql with php??
| From: | Hugh Bothwell | Date: | Sun, 12 Aug 2001 02:20:10 +0000 |
| Subject: | Re: create tables in mysql with php?? | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-11258@lists.php.net to get a copy of this message | ||
"Jon Cheng" <joncheng2000@yahoo.com> wrote in message
news:001901c122d1$6f5c1720$0200a8c0@joncheng...
> hello all, is there ANYWAY to create a new table in mysql with php?
> or must I output to a file, and run a command?
$query =
"CREATE TABLE newtable ( "
." id INT AUTO_INCREMENT, "
." name VARCHAR(20), "
." ts DATETIME, "
." PRIMARY KEY(id) "
.")";
$mysql_query($query);