|
-
May 16th, 2007, 08:07 PM
#1
Thread Starter
Member
[RESOLVED] It just won't creat a table...
Whats wrong with my code?
PHP Code:
<?php
$dbhost = '';
$dbuser = '';
$dbpass = '';
$dbname = '';
$con = mysql_connect($dbhost, $dbuser,$dbpass);
if (!$con)
{
die('Error Connecting To Database' . mydwl_error());
}
$datab = mysql_select_db($dbname,$con);
if (!$datab)
{
die('Error Connecting To Database' . mysql_error());
}
$sqltable = "CREATE TABLE users (
UserID int NOT NULL AUTO_INCREMENT PRIMARY KEY,
UserName varchar(15),
PassWord varchar(15),
Email varchar,
KeyCode varchar(20),
Validated enum('TRUE','FALSE'),
MainLang varchar,
RegeDate datetime NOT NULL,
LastDate datetime NOT NULL,
RecQues varchar,
RecAns varchar,
AcStat enum('Member','Moderator','Administrator','Banned','Frozen','Blocked'),
Level enum('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20'),
UserRank varchar
)";
echo $sqltable; //just testing
mysql_query($sqltable,$con);
mysql_close($con);
?>
-
May 16th, 2007, 08:14 PM
#2
Re: It just won't creat a table...
Add this after the call to mysql_query
PHP Code:
echo mysql_error();
-
May 16th, 2007, 08:36 PM
#3
Thread Starter
Member
Re: It just won't creat a table...
Thanks... I was actually thinking about it... and my problem is that I thought its just not generating an error... I never atually buthred checking if i even made a mysql_error for the query...
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|