I have table like this:
CREATE TABLE `developer` (
`id` bigint(20) AUTO_INCREMENT,
`name` varchar(1024) NOT NULL,
`link` varchar(1024) NOT NULL,
`parent` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `parent` (`parent`),
CONSTRAINT `developer_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `developer` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_unicode_ci;
I want get only id,name in PDO::FETCH_KEY_PAIR array from this table and use:
Developer::find()->select(['id', 'name'])->asArray()->all();
But I can not get the data in PDO::FETCH_KEY_PAIR format
how can i do it?