PHPmyadmin help needed

Discussion in 'PHP' started by googleandroid, Dec 31, 2007.

  1. #1
    I am using a MOD called Stargate portal for phpbb3 and i need to do the following to install the MOD:

    Edit the schemas since you use a different prefix.

    Open mysqli_schema and schema_data and where it creates or insert tables, change the prefix from phpbb to yours.

    Once that's done, go to yoru phpMyAdmin and there's an import page. Go to it. From there, you can browse and select those files and import the data. Import mysqli_schema first and then schema_data. That should do it.




    Now i don't understand these instructions.

    this is some code from mysqli_schema:

    #
    # $Id: mysql_41_schema.sql,v 0.03 2007/12/10 10:13:00 Michaelo Exp $
    #
    
    # Table: 'phpbb_k_cyber_quotes'
    CREATE TABLE phpbb_k_cyber_quotes (
       quote_id int(11) unsigned NOT NULL auto_increment,
       quote text,
       author varchar(255) default NULL,
       PRIMARY KEY  (quote_id)
    ) CHARACTER SET utf8 COLLATE utf8_bin;
    PHP:
    there is heaps more of these, like 'phpbb_k_blocks', 'phpbb_k_blocks_config', 'phpbb_k_acronyms' etc, So what do I change # Table: 'phpbb_k_cyber_quotes' to and what do I change CREATE TABLE phpbb_k_cyber_quotes to? My table is phpbb_99, so do I change it to this:

    # Table: 'phpbb_99k_cyber_quotes'

    CREATE TABLE phpbb_99k_cyber_quotes



    And in the schema_data there is heaps of this code:

    #
    # $Id: schema_data.sql,v 0.001 26 September 2007 17:58 Michaleo Exp $
    #
    
    # POSTGRES BEGIN #
    
    INSERT INTO phpbb_k_menus (m_id, ndx, menu_type, name, link_to, append_sid, append_uid, alt, menu_icon, view_by) VALUES (NULL,  1, 1, 'Portal', 'portal.php', 0, 0, 'Portal', 'menu_pip3.gif', 1);
    INSERT INTO phpbb_k_menus (m_id, ndx, menu_type, name, link_to, append_sid, append_uid, alt, menu_icon, view_by) VALUES (NULL,  2, 1, 'Forum', 'index.php', 0, 0, 'Index', 'menu_pip3.gif', 1);
    INSERT INTO phpbb_k_menus (m_id, ndx, menu_type, name, link_to, append_sid, append_uid, alt, menu_icon, view_by) VALUES (NULL,  3, 1, 'Album', 'inprogress.php', 0, 0, 'Album', 'menu_pip3.gif', 1);
    INSERT INTO phpbb_k_menus (m_id, ndx, menu_type, name, link_to, append_sid, append_uid, alt, menu_icon, view_by) VALUES (NULL,  4, 1, 'Bookmarks', 'ucp.php?i=main&mode=bookmarks', 0, 0, '', 'menu_pip3.gif', 2);
    INSERT INTO phpbb_k_menus (m_id, ndx, menu_type, name, link_to, append_sid, append_uid, alt, menu_icon, view_by) VALUES (NULL,  5, 1, 'Downloads', 'inprogress.php', 0, 0, '', 'menu_pip3.gif', 2);
    PHP:

    Where do I change the prefix in this so I can finish installing this mod?
     
    googleandroid, Dec 31, 2007 IP
  2. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #2
    in sql you need to replace the string using notepad.

    can u send name of a existing table so as to better help u

    Regards

    Alex
     
    kmap, Dec 31, 2007 IP
  3. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #3
    Open "config.php"
    In that file there's going to be a line that looks like this.
    $table_prefix = '';
    Code (markup):
    It might also look somthing like this
    $table_prefix = 'phpbb_99';
    Code (markup):
    Basicly whatever the value of that variable, is what you need to use for the replacement. So if that line in your "config.php" looked like this
    $table_prefix = 'my_';
    Code (markup):
    Then you would alter the CREATE TABLE and INSERT INTO statements from these two
    CREATE TABLE phpbb_k_cyber_quotes (
    INSERT INTO phpbb_k_menus (
    Code (markup):
    To the following two,
    CREATE TABLE my_k_cyber_quotes (
    INSERT INTO my_k_menus (
    Code (markup):
     
    joebert, Dec 31, 2007 IP
  4. kendo1979

    kendo1979 Peon

    Messages:
    208
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    since the original prefix should be phpbb, use notepad search and replace function to replace all "phpbb_" occurance with "phpbb_99_"
     
    kendo1979, Jan 1, 2008 IP