Re: [PHP-DB] Multiple instances of mysql_connect() in single PHP document.

2009-11-11 Thread Richard Quadling
2009/11/11 Bastien Koert phps...@gmail.com: On Tue, Nov 10, 2009 at 4:14 PM, Timothy Legg php_l...@timothylegg.com wrote: Hello, Is it wrong to have mysql_connect() called twice within a single PHP document, such as this?  I have been running into some fairly annoying query failures that

Re: [PHP-DB] losing MySQL resource

2009-11-11 Thread Stan
OK. The secret, as has been stated here before, is to load the class definitions BEFORE calling session_start(). Thanks to everyone. Andy Shellam (Mailing Lists) andy-li...@networkmail.eu wrote in message news:3339c510-be08-4426-9265-ba1965a9a...@networkmail.eu... Hi Stan, Are you saving the

RE: [PHP-DB] losing MySQL resource

2009-11-11 Thread Nehemias Duarte
I was under the impression that session_start() had to be the FIRST thing ran in the script. Is this incorrect? OK. The secret, as has been stated here before, is to load the class definitions BEFORE calling session_start(). Thanks to everyone. Andy Shellam (Mailing Lists)

RE: [PHP-DB] losing MySQL resource

2009-11-11 Thread Ford, Mike
-Original Message- From: Nehemias Duarte [mailto:ndua...@aflac.com] Sent: 11 November 2009 14:25 To: Stan; php-db@lists.php.net Subject: RE: [PHP-DB] losing MySQL resource I was under the impression that session_start() had to be the FIRST thing ran in the script. Is this

Re: [PHP-DB] Multiple instances of mysql_connect() in single PHP document.

2009-11-11 Thread Andy Shellam (Mailing Lists)
Hi, If the databases are in the same mysql server, then you could qualify the table select with the database name and simply re-use the connection select db_name.table_name.field from db_name.table_name [where] No offence, but if I saw this in an application's source code, I'd run a mile.

Re: [PHP-DB] Multiple instances of mysql_connect() in single PHP document.

2009-11-11 Thread Chris
Andy Shellam (Mailing Lists) wrote: Hi, If the databases are in the same mysql server, then you could qualify the table select with the database name and simply re-use the connection select db_name.table_name.field from db_name.table_name [where] No offence, but if I saw this in an