TinyPortal

General => Chit chat => Topic started by: fenris_w0lf on February 05, 2006, 10:29:10 PM

Title: Connection ID
Post by: fenris_w0lf on February 05, 2006, 10:29:10 PM
In what (if any) TP/SMF variable do I find my connection id to the mysql database ?

Would be used in something like:

Quote$result_id = mysql_query ($query, $connection_id);
Title: Re: Connection ID
Post by: bloc on February 05, 2006, 11:00:14 PM
All are in Settings.php. They are called:

$db_server
$db_name
$db_user
$db_passwd

If getting a connection to another databse is the goal. In SMF/TP all you need is to call the table with the query, the connection is already open on the SMF databse.
Title: Re: Connection ID
Post by: fenris_w0lf on February 05, 2006, 11:05:08 PM
Thanks for the reply Bloc,

but;

thats the server, db-name, user and pw - but not the connection id !? isnt that stored in any global variable ?? (I would think usually a number of some sort...)

The one you would normally do a:

mysql_close ( connection id here )

on....
Title: Re: Connection ID
Post by: fenris_w0lf on February 05, 2006, 11:46:04 PM
I appologize. This prolly doesnt make any sense.

I'm used to a *very* different environment where most users gets theyre own spid on the database (win/hpux-sybase install) - seems this is not the case with SMF (and similar forums etc).

Ignore this topic please.

/me blushes lightly  ::)
Title: Re: Connection ID
Post by: bloc on February 06, 2006, 12:28:48 AM
:)