tags:

views:

15

answers:

1

Hi, is there a way to get s.th. like a connection id of a PDO connection connected to mysql?

+1  A: 

Try sth like this.

print_r($dbh->query('SELECT CONNECTION_ID()')->fetch(PDO::FETCH_ASSOC));

you can use a regular query to execute the CONNECTION_ID() mysql command to get the connection ID.

See the mySQL manual for more

harkman