Is there a way to get a unique connection id of a PDO connection to mysql?
            Asked
            
        
        
            Active
            
        
            Viewed 5,738 times
        
    1 Answers
15
            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.
        Jürgen Hörmann
        
- 462
 - 4
 - 17