473,569 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

multiple database select

268 Contributor
Hi friends

In my application i need to connect multiple database.First i connect one database and got the value then i connect another database to insert the values . If any possible to two database to connect single application .

Please send me your suggestion .


Thanks
vssp
Jul 26 '06 #1
3 3528
iam_clint
1,208 Recognized Expert Top Contributor
depends on the application and language its written in.
Jul 26 '06 #2
ronverdonk
4,258 Recognized Expert Specialist
Following is a quote from an entry in the php.net documentation for mysql_select_db :

matsko at rogers dot com 10-May-2006 09:19
Just incase the mysql_select_db () function still won't work with multiple database connections (as has happened to me before).

$dbh1 = mysql_pconnect( $host,$user,$pa ss);
$dbh2 = mysql_pconnect( $host,$user,$pa ss);

You could do this...

mysql_query("US E database1",$dbh 1);
mysql_query("Us e database2",$dbh 2);

This does the same thing as the mysql_select_db () function...

or this...

You don't even have to select the database for each connection.

mysql_query("SE LECT * FROM database1.table ",$dbh1);
mysql_query("SE LECT * FROM database2.table ",$dbh2);
Ronald :cool:
Aug 4 '06 #3
vssp
268 Contributor
Thanks friends
Aug 24 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
6094
by: DarthMacgyver | last post by:
Hello, I recently wrote a survey application. Each question is very similar. The first questions gives me a problem when there are multiple people taking the survey (The Database connection Timed out) I am using the Data Access Application Blocks as ASP.NET (using VB.NET) and SQL 2000. In there first question there can be up to 27...
6
2520
by: Don Leverton | last post by:
Hi All, I've got a situation where I am developing an Access 97 app for a client, and am in the "beta testing" stage. I have split the app up, using the DB splitter, into front-end /back-end for the usual reason ... so I can mess with form/report revisions. Since splitting, I've had issues with re-linking the tables ... as it relates to...
9
12956
by: jaYPee | last post by:
I have search a lot of thread in google newsgroup and read a lot of articles but still i don't know how to update the dataset that has 3 tables. my 3 tables looks like the 3 tables from northwind database that has an employees, orders, and order details. the following are the 3 tables in my sql database students schyrsem
4
3742
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure and username, password etc will be exactly the same for each server, the only thing that will change is the server name. Idealy I would like to get...
12
1746
by: Peter Proost | last post by:
Hi group, has anyone got any suggestions fot the best way to handle this problem, I've got 3 tables for example table A, B, and C table A looks like name, value table B looks like name, value table C looks like variablename, value, value an example would be
0
1883
by: rich | last post by:
I have a database with 1 to many and the many is a list with multiple selects in a list. When I click on a master record I have as part of my form the select statement for the multiple choice list. I want the list to highlight the multiple chosen values. here is part of the code. $dresscat = specdresscat($dresstypeid); //this is the...
52
6278
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible variations(combination of fields), - then act on each group in some way ...eg ProcessRs (oRs as RecordSet)... the following query will get me the...
7
5296
by: ozzii | last post by:
Hi I have a HTML form with a multiple select box. The multiple select box is populated from a database. A user can select multiple options form this select box and the infomrtaion is then stored in a database. The user then has the option to edit their saved record. How do i populate this multiple select box from a database with the users...
2
1926
by: dylanhughes | last post by:
I'm looking for an example of a login system that has multiple fields (2 to be exact) + password. e.g username, company name and password, the user, company and password are checked against a mysql database. I have it working with just the username field but I'm confused on how to go about adding another field. I'm pretty new to PHP so don't...
3
7179
by: DeanL | last post by:
Hi guys, Does anyone know of a way to create multiple tables using information stored in one table? I have a table with 4 columns (TableName, ColumnName, DataType, DataSize) and wanted to know if there is a way to use the information in this table to create the many tables that are listed in the source table instead of creating each table...
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.