WEB mysql people: need some help installing a module

Discussion in 'OT Technology' started by gandhibrokemyskates, Jan 29, 2010.

  1. gandhibrokemyskates

    gandhibrokemyskates slangin beer

    Joined:
    Jun 22, 2001
    Messages:
    28,157
    Likes Received:
    0
    Location:
    Houston
    I'm a noob when it comes to mysql, however, i pick up new things fairly quick. I'm installing a module on an Oscommerce shopping cart of mine and confused about some mysql parts.

    Run the supplied SQL using PHPMyAdmin or similar. I go into my control panel for my website, go to Mysql, then the database to enter the codes. I'm supposed to enter:

    Go to run SQL query/queries on server and plug this in:

    CREATE TABLE coupon_to_customer (
    coupon_id int(11) NOT NULL default '0',
    customer_id int(11) NOT NULL default '0',
    order_id int(11) NOT NULL default '0',
    redeem_date datetime NOT NULL default '0000-00-00 00:00:00',
    PRIMARY KEY (coupon_id,customer_id,order_id)
    ) TYPE=MyISAM;

    CREATE TABLE coupons (
    coupon_id int(11) NOT NULL auto_increment,
    coupon_code varchar(32) NOT NULL default '',
    coupon_amount decimal(15,4) NOT NULL default '0.0000',
    coupon_type tinyint(1) NOT NULL default '0',
    coupon_status tinyint(1) NOT NULL default '0',
    coupon_use tinyint(1) NOT NULL default '0',
    PRIMARY KEY (coupon_id)
    ) TYPE=MyISAM;

    Then I get this

    SQL query:

    CREATE TABLE coupon_to_customer(

    coupon_id INT( 11 ) NOT NULL DEFAULT '0',
    customer_id INT( 11 ) NOT NULL DEFAULT '0',
    order_id INT( 11 ) NOT NULL DEFAULT '0',
    redeem_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    PRIMARY KEY ( coupon_id, customer_id, order_id )
    ) TYPE = MYISAM ;

    MySQL said:

    #1046 - No database selected
     
  2. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
    You have to select a database in the left menu or create one. Depending on your webhost, you may not have permission to create a DB in PhpMyAdmin, but you'll instead have to use your host's control panel
     
  3. gandhibrokemyskates

    gandhibrokemyskates slangin beer

    Joined:
    Jun 22, 2001
    Messages:
    28,157
    Likes Received:
    0
    Location:
    Houston
    crap, i see the databases on the left but instructions doesn't state which one.


    Installation - you have two options
    =====================================
    1. Install a brand new RC1, or RC2 or RC2a. Then use the files in "brand new
    install" to OVERWRITE some of the files you installed. Run the supplied SQL
    using PHPMyAdmin or similar.

    OR
    ==
    2. You already are running RC1 or RC2 or RC2a, perhaps with some contributions
    installed. In this case, use the files in "older install". Files that end
    in .php can simply be uploaded to your website (as these won't overwrite
    anything). Files that end in .txt have code in them which must be added to
    the already existing osCommerce files that you have. Run the supplied SQL
    using PHPMyAdmin or similar. See Appendix A below.
     
  4. gandhibrokemyskates

    gandhibrokemyskates slangin beer

    Joined:
    Jun 22, 2001
    Messages:
    28,157
    Likes Received:
    0
    Location:
    Houston
    there is an option to create a table. what do i put in number of fields?
     
  5. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10
    import the sql into the database that you setup to run it
     
  6. gandhibrokemyskates

    gandhibrokemyskates slangin beer

    Joined:
    Jun 22, 2001
    Messages:
    28,157
    Likes Received:
    0
    Location:
    Houston
    I think i'm getting it.

    where do i insert this part?
    PRIMARY KEY (coupon_id,customer_id,order_id)
     

Share This Page