Re: How to create table?
| From: | MERSAL | Date: | Wed, 15 Aug 2001 12:42:55 +0000 |
| Subject: | Re: How to create table? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-11374@lists.php.net to get a copy of this message | ||
Your code is good but your forget something simple,
look your code after Edit
<?php
$connexion = mysql_connect("localhost","login","passwd") or die
("ERROR
de connexion on Server");
print ("Connection ok");
mysql_select_db("database_name",$connexion) or die ("Cant find db");
$table= "CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species
VARCHAR(20), sex CHAR(1), birth DATE, death DATE)";
mysql_query('databse_name',$table);
?>
mysql_query -- Send a MySQL query
MERSAL
--- Jan Grafstrom <jan@lillemanshus.com> wrote:
> Hi!
> I have just started to learn about mysql and wonder if my code is good?
> <?php
> $connexion = mysql_connect("localhost","login","passwd") or die
> ("ERROR
> de connexion on Server");
> print ("Connection ok");
> mysql_select_db("database_name",$connexion) or die ("Cant find db");
>
> $table= "CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species
> VARCHAR(20), sex CHAR(1), birth DATE, death DATE)";
> ?>
> Thanks in advance for any help.
>
> Regards
> Jan
>
>
>
> > --
> 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
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/