RE: [PHP] General Mysql Connect

2008-10-30 Thread Jay Blanchard
[snip] > a new connection, but in terms of op codes, a new connection is created. no idea why your going on about op codes, and no a new connection is not made - there is merely switching between DBs on a single connection. it's the same as connecting with the mysql cmdline util and being able to

Re: [PHP] General Mysql Connect

2008-10-30 Thread Jochem Maas
Ashley Sheridan schreef: > On Wed, 2008-10-29 at 20:28 -0500, Micah Gersten wrote: >> Ashley Sheridan wrote: >>> On Wed, 2008-10-29 at 20:12 -0500, Micah Gersten wrote: >>> Waynn Lue wrote: >> With MySQL, you can change the DB from query to query with >> mysql_select_db.

Re: [PHP] General Mysql Connect

2008-10-30 Thread Ashley Sheridan
On Wed, 2008-10-29 at 20:28 -0500, Micah Gersten wrote: > Ashley Sheridan wrote: > > On Wed, 2008-10-29 at 20:12 -0500, Micah Gersten wrote: > > > >> Waynn Lue wrote: > >> > With MySQL, you can change the DB from query to query with > mysql_select_db. The alternative as I stated

Re: [PHP] General Mysql Connect

2008-10-29 Thread Micah Gersten
Ashley Sheridan wrote: > On Wed, 2008-10-29 at 20:12 -0500, Micah Gersten wrote: > >> Waynn Lue wrote: >> With MySQL, you can change the DB from query to query with mysql_select_db. The alternative as I stated in my last post is to use the fully qualified table name (databas

Re: [PHP] General Mysql Connect

2008-10-29 Thread Ashley Sheridan
On Wed, 2008-10-29 at 20:12 -0500, Micah Gersten wrote: > Waynn Lue wrote: > >> With MySQL, you can change the DB from query to query with > >> mysql_select_db. The alternative as I stated in my last post is to use > >> the fully qualified table name (database.table) in your query. MySQL > >> doe

Re: [PHP] General Mysql Connect

2008-10-29 Thread Micah Gersten
Waynn Lue wrote: >> With MySQL, you can change the DB from query to query with >> mysql_select_db. The alternative as I stated in my last post is to use >> the fully qualified table name (database.table) in your query. MySQL >> doesn't care which DB you have open if you do that. In both of thes

Re: [PHP] General Mysql Connect

2008-10-29 Thread Micah Gersten
Ashley Sheridan wrote: > On Wed, 2008-10-29 at 19:57 -0500, Micah Gersten wrote: > >> Ashley Sheridan wrote: >> >>> On Wed, 2008-10-29 at 19:49 -0500, Micah Gersten wrote: >>> >>> Ashley Sheridan wrote: > On Wed, 2008-10-29 at 19:43 -0500, Micah Ge

Re: [PHP] General Mysql Connect

2008-10-29 Thread Chris
The answer in your case is not to combine the DBs necessarily, but consolidate the connections used. Like I said, you can use 2 MySQL DBs on the same connection in PHP. There's no reason to sacrifice separation of data. Forgot about this one until now.. mysql also supports the extended syntax:

Re: [PHP] General Mysql Connect

2008-10-29 Thread Waynn Lue
> > With MySQL, you can change the DB from query to query with > mysql_select_db. The alternative as I stated in my last post is to use > the fully qualified table name (database.table) in your query. MySQL > doesn't care which DB you have open if you do that. In both of these > cases, the same

Re: [PHP] General Mysql Connect

2008-10-29 Thread Ashley Sheridan
On Wed, 2008-10-29 at 19:57 -0500, Micah Gersten wrote: > Ashley Sheridan wrote: > > On Wed, 2008-10-29 at 19:49 -0500, Micah Gersten wrote: > > > >> Ashley Sheridan wrote: > >> > >>> On Wed, 2008-10-29 at 19:43 -0500, Micah Gersten wrote: > >>> > >>> > Ashley Sheridan wrote:

Re: [PHP] General Mysql Connect

2008-10-29 Thread Micah Gersten
Ashley Sheridan wrote: > On Wed, 2008-10-29 at 19:49 -0500, Micah Gersten wrote: > >> Ashley Sheridan wrote: >> >>> On Wed, 2008-10-29 at 19:43 -0500, Micah Gersten wrote: >>> >>> Ashley Sheridan wrote: > On Wed, 2008-10-29 at 19:25 -0500, Micah Ge

Re: [PHP] General Mysql Connect

2008-10-29 Thread Ashley Sheridan
On Wed, 2008-10-29 at 19:49 -0500, Micah Gersten wrote: > Ashley Sheridan wrote: > > On Wed, 2008-10-29 at 19:43 -0500, Micah Gersten wrote: > > > >> Ashley Sheridan wrote: > >> > >>> On Wed, 2008-10-29 at 19:25 -0500, Micah Gersten wrote: > >>> > >>> > Ashley Sheridan wrote:

Re: [PHP] General Mysql Connect

2008-10-29 Thread Micah Gersten
Ashley Sheridan wrote: > On Wed, 2008-10-29 at 19:43 -0500, Micah Gersten wrote: > >> Ashley Sheridan wrote: >> >>> On Wed, 2008-10-29 at 19:25 -0500, Micah Gersten wrote: >>> >>> Ashley Sheridan wrote: > On Thu, 2008-10-30 at 08:55 +1100, Chris w

Re: [PHP] General Mysql Connect

2008-10-29 Thread Ashley Sheridan
On Wed, 2008-10-29 at 19:43 -0500, Micah Gersten wrote: > Ashley Sheridan wrote: > > On Wed, 2008-10-29 at 19:25 -0500, Micah Gersten wrote: > > > >> Ashley Sheridan wrote: > >> > >>> On Thu, 2008-10-30 at 08:55 +1100, Chris wrote: > >>> > >>> > Waynn Lue wrote: > >

Re: [PHP] General Mysql Connect

2008-10-29 Thread Micah Gersten
Ashley Sheridan wrote: > On Wed, 2008-10-29 at 19:25 -0500, Micah Gersten wrote: > >> Ashley Sheridan wrote: >> >>> On Thu, 2008-10-30 at 08:55 +1100, Chris wrote: >>> >>> Waynn Lue wrote: > I sent an email to the mysql list, but it reminded me of

Re: [PHP] General Mysql Connect

2008-10-29 Thread Ashley Sheridan
On Wed, 2008-10-29 at 19:25 -0500, Micah Gersten wrote: > Ashley Sheridan wrote: > > On Thu, 2008-10-30 at 08:55 +1100, Chris wrote: > > > >> Waynn Lue wrote: > >> > >>> I sent an email to the mysql list, but it reminded me of a question I had > >>> for people structuring their PHP code. W

Re: [PHP] General Mysql Connect

2008-10-29 Thread Micah Gersten
Ashley Sheridan wrote: > On Thu, 2008-10-30 at 08:55 +1100, Chris wrote: > >> Waynn Lue wrote: >> >>> I sent an email to the mysql list, but it reminded me of a question I had >>> for people structuring their PHP code. What's the general way that people >>> structure their connections? R

Re: [PHP] General Mysql Connect

2008-10-29 Thread Ashley Sheridan
On Thu, 2008-10-30 at 08:55 +1100, Chris wrote: > Waynn Lue wrote: > > I sent an email to the mysql list, but it reminded me of a question I had > > for people structuring their PHP code. What's the general way that people > > structure their connections? Right now, I spawn off two mysql_connect

Re: [PHP] General Mysql Connect

2008-10-29 Thread Chris
Waynn Lue wrote: I sent an email to the mysql list, but it reminded me of a question I had for people structuring their PHP code. What's the general way that people structure their connections? Right now, I spawn off two mysql_connect calls at the top of the file that includes my database calls

[PHP] General Mysql Connect

2008-10-29 Thread Waynn Lue
I sent an email to the mysql list, but it reminded me of a question I had for people structuring their PHP code. What's the general way that people structure their connections? Right now, I spawn off two mysql_connect calls at the top of the file that includes my database calls, using "true" for