private function extractPkName($table)
    {
        if (is_null($this->pk)) {
            // This has been tested only in MySQL so far
            $row = $this->db->showKeys()
                            ->from($table)
                            ->whereEquals('Key_name', 'PRIMARY')
                            ->getStmt()
                            ->fetch();

            $this->pk = $row['Column_name'];
        }

        return $this->pk;
    }
private function extractPkName($table)
    {
        if (is_null($this->pk)) {
            // This has been tested only in MySQL so far
            $row = $this->db->showKeys()
                            ->from($table)
                            ->whereEquals('Key_name', 'PRIMARY')
                            ->getStmt()
                            ->fetch();

            $this->pk = $row['Column_name'];
        }

        return $this->pk;
    }
private function extractPkName ( $ table ) { if ( is_null ( $ this -> pk ) ) { // This has been tested only in MySQL so far $ row = $ this -> db -> showKeys ( ) -> from ( $ table ) -> whereEquals ( 'Key_name' , 'PRIMARY' ) -> getStmt ( ) -> fetch ( ) ; $ this -> pk = $ row [ 'Column_name' ] ; } return $ this -> pk ; }
Extracts PK column from a table

@param string $table
@return string
Extracts PK column from a table