Results 1 to 10 of 10

Thread: Adding MySQL Tables

  1. #1
    Member
    Join Date
    Dec 2008
    Posts
    10

    Default Adding MySQL Tables

    Not sure if this the right place to post this....

    I have created a MySQL database to use for a login script that I want to install. I also have a MySQL table, but know where I need to put/save the table so that it works right. Any help would be greatly appreciated.

  2. #2
    Member
    Join Date
    Sep 2007
    Posts
    38

    Default

    You should be able to enter your table sytax using MyPHPAdmin, there is a link to this under databases in Cpanel. Hope that helps...

  3. #3
    Member
    Join Date
    Sep 2008
    Posts
    31

    Default

    save your table as txt file.
    Then go to phpMyAdmin --> Import and select your text file to import it into the database.
    cPanelConfig.com - The fastest growing cPanel configuration guide on the net

  4. #4
    Member
    Join Date
    Dec 2008
    Posts
    10

    Default

    Alright, thanks much guys

  5. #5
    Member
    Join Date
    Dec 2008
    Posts
    10

    Default

    When I'm uploading, do I need to worry about what the SQL compatibility mode is set to? Or should I just leave it as none?

  6. #6
    Member
    Join Date
    Dec 2008
    Posts
    10

    Default

    I tried uploading the following table:

    Code:
    CREATE TABLE  `users` (
     `id` INT( 20 ) NOT NULL AUTO_INCREMENT ,
     `full_name` VARCHAR( 200 ) COLLATE latin1_general_ci NOT NULL DEFAULT  '',
     `user_name` VARCHAR( 200 ) COLLATE latin1_general_ci NOT NULL DEFAULT  '',
     `user_pwd` VARCHAR( 200 ) COLLATE latin1_general_ci NOT NULL DEFAULT  '',
     `user_email` VARCHAR( 200 ) COLLATE latin1_general_ci NOT NULL DEFAULT  '',
     `activation_code` INT( 10 ) NOT NULL DEFAULT  '0',
     `joined` DATE NOT NULL DEFAULT  '0000-00-00',
     `country` VARCHAR( 100 ) COLLATE latin1_general_ci NOT NULL DEFAULT  '',
     `user_activated` INT( 1 ) NOT NULL DEFAULT  '0',
    PRIMARY KEY (  `id` )
    )
    And I returned the following:

    MySQL returned an empty result set (i.e. zero rows)

    So what do I need to do to fix this?

  7. #7
    Member
    Join Date
    Dec 2008
    Posts
    7

    Default

    MySQL returned an empty result set
    But you're table is created I guess?

    An empty result set means that there aren't records in the table yet.

    If you would want to import records into that table, you can use for example the following SQL:

    Code:
    INSERT INTO `users` (`id`, `full_name`, `user_name`, `user_pwd`, `user_email`, `activation_code`, `joined`, `country`, `user_activated`) VALUES
    (1, 'full name', 'user name', 'user pwd', 'user email', 123, '2008-12-22', 'France', 1);

  8. #8
    Member
    Join Date
    Dec 2008
    Posts
    10

    Default

    Okay, help me out a little here....

    Where would I put the results in the actual code? I've never worked with sql before, and really have no idea what I'm doing....

  9. #9
    Member
    Join Date
    Dec 2008
    Posts
    7

    Default

    lol, you have no idea

    Maybe you should tell us what you want to do.
    And then tell us how you would like to do that ...


    Just to have some more information because now I don't understand a lot of what you want

  10. #10
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    10,122
    cPanel/WHM Access Level

    Root Administrator

    Question

    What does any of this have to do with cPanel?

Similar Threads

  1. Federated Tables in MySQL
    By Nikoms in forum cPanel & WHM Discussions
    Replies: 8
    Last Post: 11-20-2007, 10:11 AM
  2. Deleting the MYSQL tables :|
    By Grzeslaw in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 03-01-2007, 11:16 AM
  3. MailScanner MySQL Tables
    By kaspersetz in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 11-29-2006, 03:33 AM
  4. something is adding tables to my iptables
    By bobbybobbertson in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 09-18-2003, 11:00 AM
  5. temporary mySQL tables
    By bonnmac in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 06-04-2003, 08:18 AM