system/classes/Db_MySQL.php
protected function primaryKeyStringFromArray($dataMember, $opening, $sep = ', ')
    {
        if (empty($this->$dataMember)) {
            return 0;
        }
        $this->query .= $opening;
        $constraintName = 'pk';
        $query = ' PRIMARY KEY (';
        $count = count($this->$dataMember);
        for($i=0; $i<$count; $i++) {
            $item = $this->{$dataMember}[$i];
            $constraintName .= '_'.$item;
            $query .= $item;
            if ($count-1 != $i) {
                $query .= $sep;
            }
        }
        $query .= ')';
        $this->query .= $constraintName.' '.$query;
    }
protected function primaryKeyStringFromArray($dataMember, $opening, $sep = ', ')
    {
        if (empty($this->$dataMember)) {
            return 0;
        }
        $this->query .= $opening;
        $constraintName = 'pk';
        $query = ' PRIMARY KEY (';
        $count = count($this->$dataMember);
        for($i=0; $i<$count; $i++) {
            $item = $this->{$dataMember}[$i];
            $constraintName .= '_'.$item;
            $query .= $item;
            if ($count-1 != $i) {
                $query .= $sep;
            }
        }
        $query .= ')';
        $this->query .= $constraintName.' '.$query;
    }
For outputting a string of the following form from the 'primaryKeys' array in Database.
CONSTRAINT pk_id_name PRIMARY KEY (id, name)