Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > data from multiple databases

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-19-08, 06:33
tomek_k tomek_k is offline
Registered User
 
Join Date: Oct 2008
Location: Poland
Posts: 2
data from multiple databases

Hi!
I have to insert, update and select data from mulitple databases witch are on different servers, I'm using pdo in my project.
What I have is:
I parse an *.ini file where is configuration to main database server, I connect to this database and everything is ok, but in some part of my application user choose from checkbox data witch define database to connect, how to checked what user has choosen I think like this:
PHP Code:
foreach($_POST['checkbox.name'] as $ids){} 
but I don't know the number of option, and how to connect to specific database server and for example insert some data, to all of database witch user has choosen using checkbox?
could you help me, please?
Reply With Quote
  #2 (permalink)  
Old 11-21-08, 03:18
Frunkie Frunkie is offline
Gives Bad Advice
 
Join Date: Mar 2007
Location: 010101010110100
Posts: 706
I think your problem is far to broad to even answer. You have other issues going on that need to be addressed first such as connecting to multiple databases.

Are you using a single connection script for this or multiple scripts? Are you doing this procedurally?

If all you are asking is how to have the user select a certain database, then yes, you can use the checkbox. I'm not sure why you would be using a foreach loop for this though.

If you want detailed help, you need to post all of the code you are working on.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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