At 14:35 -0400 4/30/03, Prince wrote:
>i have mysql 188.8.131.52 (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.