to which you add

$result = mysql_query( $table );

which will execute your statement and create the table.

And I think       pet (name VARCHAR(20)
should be        pet  VARCHAR(20)

HTH - Miles

At 02:03 PM 8/15/01 +0200, Jan Grafstrom wrote:
>I have just started to learn about mysql and wonder if my code is good?
>$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.
>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]

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]

Reply via email to