table

A

Anonymous

Guest
for some reason.. the table does not want to creat on the database.. can someone please help me and tell me what the hell am i doing wrong... thanx...

Code:
<?php

$db = mysql_connect("localhost","root","123456");
      mysql_select_db("testing",$db);

$Query="
CREATE TABLE Members(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
username VARCHAR(30),
email VARCHAR(30))
";

      mysql_close($db);
?>
can you please tell me what is going on.. thanx
 
Try do this:

Code:
<?php

$db = mysql_connect("localhost","root","123456");
      mysql_select_db("testing",$db);


$result = mysql_query("CREATE TABLE Members(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
username VARCHAR(30),
email VARCHAR(30))")
    or die("Invalid query: " . mysql_error());
?>

  mysql_close($db);
?>
 
Back
Top