Re: Database/Table Import Error [message #2339 is a reply to message #2336] |
Fri, 06 November 2009 05:43 |
AJM
Messages: 2371 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I have tried this on my PC and I cannot reproduce the fault. It may be because of something in your config.inc file, so can you post me its contents? You can block out your username and password.
The way the $dbprefix feature is supposed to work is as follows:
- you have a database called 'foobar'
- it is imported into the data dictinary as 'foobar'
- you may create a copy of this database called 'dev1_foobar', but in order to access it your config.inc file should identify it as $dbname='foobar' and $dbprefix='dev1_'
- the dictionary import functions will use $dbprefix to access the database schema, but will use only $dbname within the dictionary database.
This means that you can have as may copies of 'foobar' as you like, such as 'dev1_foobar', 'dev2_foobar', 'this_foobar' and 'that_foobar', but the data dictionary will only have one set of details under the name 'foobar'. At runtime you can only access one of these databases, so you set the value of $dbprefix in your config.inc file accordingly.
If the dbname in the data dictionary includes the dbprefix then you have done something wrong.
I did find one small problem in the dict_table_key class, so I have attached an updated file.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|