table

Codes here !

Moderators: egami, macek, gesf

Post Reply
User avatar
xlordt
New php-forum User
New php-forum User
Posts: 34
Joined: Thu Dec 12, 2002 9:00 pm
Location: NJ
Contact:

Sat Dec 14, 2002 11:22 pm

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: Select all


<?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
Computer/Programm rox.. (php, c/c++ will take over soon muhahah

User avatar
xlordt
New php-forum User
New php-forum User
Posts: 34
Joined: Thu Dec 12, 2002 9:00 pm
Location: NJ
Contact:

Sun Dec 15, 2002 2:07 am

please disregard this post.. thanx.. i figured it out
Computer/Programm rox.. (php, c/c++ will take over soon muhahah

User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Sun Dec 15, 2002 2:56 am

Try do this:

Code: Select all


<?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);
?>
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests