List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 30 2003 8:49pm
Subject:Re: connection_id() in mysql 3.22.1
View as plain text  
At 14:35 -0400 4/30/03, Prince wrote:
>hi..
>i have mysql 3.2.3.6 (or something like that) and want to use 
>connection_id() in a query to get the connection id for a session # 
>and it works fine but when trying to get a connection id on mysql 
>3.22.1 the function connection_id() doesnt exist (as far as i know 
>of) is there any way to get the connection id from the server with 
>that version number?
>
>im trying to get it from a php script

CONNECTION_ID() was introduced in 3.23.14, so (as you've discovered)
you cannot get it using a SQL statement with 3.22.1.

Another way to get the connection ID is to use the PHP mysql_thread_id()
function.  However, this wasn't introduced until PHP 4.3.0, and I suspect
that if you're using such an old version of MySQL, you probably have an
older version of PHP as well.
Thread
connection_id() in mysql 3.22.1Prince30 Apr
  • Re: connection_id() in mysql 3.22.1Paul DuBois1 May