Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 12:16 am EDT

Geeklog Forums

Change Table Name


auspexian

Anonymous
Hi all, I have two sites in the same database,
with two different prefix gl1_ and gl2_

I want them to share the same topics table.

both should have gl1_topics and gl1_topics.

I see that $_TABLES['topics'] is where I can get the name of the tables, but where does the name gl1_topics get defined?? or gl1_anytable defined?

Tks

John
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The file you're looking for is system/lib-database.php

However, you may run into problems when you try to share tables that way, as every object in Geeklog has a owner (i.e. the user who created the topic) and a owner group. You may end up in a situation where, for example, the owner (identified by user id) may be two different persons in the two databases. For example, user Fred in the one database and user Jack in the other may both have uid 42. The same could happen with the owning group. This may cause all sorts of permission problems.

In other words: I wouldn't do that ...

bye, Dirk
 Quote

auspexian

Anonymous
Thanks.

Ok, I'll duplicate all the topics over.

John
 Quote

All times are EDT. The time is now 12:16 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content