TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,240
  • Total Topics: 21,353
  • Online today: 722
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 293
  • Total: 294
  • lurkalot

Database problem with two TP's on one database

Started by nokonium, April 29, 2005, 11:48:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bjørn

Good suggestion. But since many now has the original names, I have just changed the code to have the prefix defined 3 places, one in TPortal.php, one in TPortalAdmin.php and finally one in TPModules.php.

This way will make it easier to use several intances of the portal, just renaming the tables, and then change the prefix, and all is good.

And for those that don't need this, it will just work as before.

Nokonium

What do I need to do now?

Do you mean that 0.6beta has been ammended and I should download and install the newer version?

Then how do I change the prefixes?


Bjørn

I have changed it for v0.7beta.

But I can change it just for v.0.6 temporarily, if you need it faster.

Nokonium

If you could let me have an ammended copy of 0.6 that would be much appreciated.

Thanks Bloc

Bjørn

#14
These are the modified v0.6 beta files, with settable prefix.

I suggest overwriting your existing file( set a new prefix first, look for "// tportal prefix"), then just renaming the tables. Check if it works OK.

Then install a new version of TP on another SMF, which now will use the original "tportal_"  prefix. Do the same again, if you need more installations on the same database.



Nokonium

Thanks Bloc, be back when I've had a fiddle  ;D

Nokonium

Had a little fiddle, all is going well, but.....

Table 'db119726169.tportal_blocks' doesn't exist
File: /homepages/6/d119724375/htdocs/sgr/Sources/TPortalAdmin.php
Line: 83

This is Line 83 $request = db_query("SELECT * FROM tportal_blocks WHERE id=$val", __FILE__, __LINE__);

It looks like I need to alter the tportal to my prefix.

Off to fiddle some more....  ;D

This website is proudly hosted on Crocweb Cloud Website Hosting.