File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,17 @@ Logs SQL queries. You need to wrap your `PDO` object into a `DebugBar\DataCollec
6060    $pdo = new DebugBar\DataCollector\PDO\TraceablePDO(new PDO('sqlite::memory:')); 
6161    $debugbar->addCollector(new DebugBar\DataCollector\PDO\PDOCollector($pdo)); 
6262
63+ You can even log queries from multiple ` PDO `  connections:
64+ 
65+     $pdoRead  = new DebugBar\DataCollector\PDO\TraceablePDO(new PDO('sqlite::memory:')); 
66+     $pdoWrite = new DebugBar\DataCollector\PDO\TraceablePDO(new PDO('sqlite::memory:')); 
67+ 
68+     $pdoCollector = new DebugBar\DataCollector\PDO\PDOCollector(); 
69+     $pdoCollector->addConnection($pdoRead, 'read-db'); 
70+     $pdoCollector->addConnection($pdoWrite, 'write-db'); 
71+ 
72+     $debugbar->addCollector($pdoCollector); 
73+ 
6374## RequestData  
6475
6576Collects the data of PHP's global variables
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments