Current location: Hot Scripts Forums » Programming Languages » PHP » IS IT POSSABLE... 2 databaces open..(HELP)


IS IT POSSABLE... 2 databaces open..(HELP)

Reply
  #1 (permalink)  
Old 11-16-03, 09:50 AM
warsome warsome is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation IS IT POSSABLE... 2 databaces open..(HELP)

IS it possable to connect to 2 dadtabaces...
I say this as i have a databace of Set values that are common for all servers and access points that sometimes need changing but when i do, it will be for all accounts...

BUT i also want the scripts to coneect to that accounts databace..
(each account has its own)

how can i do this?

???

----------------------

@mysql_connect ('localhost', 'xxx, xxx) or die('<i>Connection Error</i>');
mysql_select_db(dotm_common) or die('<i>DB_common load failed</i>');

$dbnam = "dotm_common";
$var = @mysql_connect('localhost', 'xxx, xxx) or die(Failed);

HOW... do i get the second one to load into the script so it can rrad from the first, and edit the second at the users prefrance?
Reply With Quote
  #2 (permalink)  
Old 11-16-03, 12:32 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
it is possible , just establish a new connection using the other database access info ...
just the way like you are using the same connection
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #3 (permalink)  
Old 11-17-03, 04:08 AM
Stefan's Avatar
Stefan Stefan is offline
Junior Code Guru
 
Join Date: Jun 2003
Location: Utrecht, The Netherlands
Posts: 599
Thanks: 0
Thanked 0 Times in 0 Posts
or, if you can use the same login information, just switch database between queries using mysql_select_db()
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
wanted: hrm / job seeker's help script .. open source PrettyPink Script Requests 1 03-24-06 01:34 AM
any suggestion...open another browser? aspuser25 ASP 4 08-25-04 12:59 AM
mouse over <tr> script open new window? angst JavaScript 0 07-30-03 08:50 AM
Company offers Open Source Solutions pbartels General Advertisements 1 06-30-03 10:00 AM
How to open a file?? bonnie ASP 10 06-17-03 05:14 AM


All times are GMT -5. The time now is 05:50 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.