multiple sites/multiple db names-same users?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   multiple sites/multiple db names-same users?
DAMIAN
CZ Active Member
 Codezwiz Site Donator
DAMIAN has been a member for over 20 year's 20 Year Member
usa.gif mississippi.gif
Occupation: Net Junkie
Age: 58
Gender: Male
Fav. Sports Team: steelers
Website:
Status: Offline
Joined: Aug 08, 2004
0.02 posts per day
Posts: 177
Points: 9,848
   
Im needing to find some information on using the same user db for several sites.(actually subdomains) Im needing to have the master site with the 4 subdomains within, but only to have the visitors register once.

Ive seen and read the basic shared db information, and thats great for when setting up a new site, but with an already existing site each with its own db and tables im not seeing how this works.

My exact setup is,
Main Site
4 Subdomains

Each of the sites(all 5) are already setup and use the base prefix for the db tables. I dont want to share the entire nuke db just the users tables. Im not comprehending how to do this when each db already has its own name and tables, but use the stock "nuke" prefix. Im assuming that if I go in now and change the prefix for the user table then it's going to corrupt the existing userbase.
Is there anyway to maybe setup a serperate db just for users and have all 5 sites refer to the same user db so that all 5 sites actually refer to a completely different db, with a different name and all.
If this makes any sense to anyone I would really appreciate the help.

Thanks
DAMIAN
[ Register or login to view links on this board.]




_________________
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]

It is better to regret something that you have done...............than to regret something that you havent done.
Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
You could initiate a new database connection and just reference the users table with it. It isnt an easy project but is very possible.

Or you can use php mysql functions instead of the sql_db layer used in Nuke.

Ex:

     $sql = "SELECT id, password FROM nuke_users";
   $result = mysql_query($sql);
       if (mysql_num_rows($result) > 0) {
           while ($row = mysql_fetch_array($result)) {
         //data
      }
   }







_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum