Results 1 to 3 of 3

Thread: [RESOLVED] It just won't creat a table...

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    35

    Resolved [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);
    ?>

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: It just won't creat a table...

    Add this after the call to mysql_query

    PHP Code:
    echo mysql_error(); 

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    35

    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
  •  



Click Here to Expand Forum to Full Width