The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Success in database CONNECTION.....

Discussion in 'cPanel Developers' started by Scotty13, May 9, 2012.

  1. Scotty13

    Scotty13 Member

    Joined:
    May 21, 2010
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Trying to get my main table to connect. Keeping getting the same error…

    Success in database CONNECTION.....
    no TABLE created. You have problems in the system already, backtrack and debug!

    My table in my script/ Dreamweaver CS 4 matches exactly to entries I have in phpMyAdmin.

    What ‘am I missing here?

    <?php
    require_once "connect_to_mysql.php";
    // Tell ourselves on screen if we have connected
    print "Success in database CONNECTION.....<br />";
    // Create the members main table in your new database
    $result = "CREATE TABLE myMembers (
    id int(11) NOT NULL auto_increment,
    uid int(11) NOT NULL,
    username varchar(255) NOT NULL,
    firstname varchar(255) NOT NULL
    lastname varchar(255) NOT NULL,
    maidenname varchar(255) NULL,
    city varchar(255) NOT NULL,
    state_province varchar(255) NOT NULL,
    country varchar(255) NOT NULL,
    workstatus varchar(255) NOT NULL,
    seniority date NOT NULL default '0000-00-00'
    airline varchar(255) NOT NULL,
    currentairline varchar(255) NOT NULL,
    previousairline varchar(255) NOT NULL,
    myfirstairline varchar(255) NOT NULL,
    email varchar(255) NOT NULL,
    locator varchar(255) NOT NULL,
    made_res_date datetime NOT NULL default '0000-00-00',
    last_ckin_date datetime NOT NULL default '0000-00-00',
    bio_body text NULL,
    website varchar(255) NULL,
    ipaddress varchar(255) NOT NULL,
    passenger_array text NULL,
    ts timestamp NULL default '0000-00-00 00:00:00',
    account_type enum('a','b','c') NOT NULL default 'a',
    email_activated enum('0','1') NOT NULL default '0',
    private enum('0','1') NOT NULL default '0',
    PRIMARY KEY (id),
    UNIQUE KEY email (email)
    ) ";
    if (mysql_query($result)){
    print "Success in TABLE creation!......
    <br /><br /><b>That completes the table setup, now delete the file <br />
    named 'create_Table.php' and you are ready to move on. Let us go!</b>";
    } else {
    print "no TABLE created. You have problems in the system already, backtrack and debug!";
    }
    exit();
    ?>


    Thanks, Scott
     
  2. charsleysa

    charsleysa Active Member

    Joined:
    Jul 18, 2011
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palmerston North, New Zealand
    cPanel Access Level:
    Root Administrator
    I would try dumping the variables to the browser using print_r() to see if the connection to the Database is having any problems.
     
  3. Scotty13

    Scotty13 Member

    Joined:
    May 21, 2010
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for your help.
     
Loading...

Share This Page