Category: arrays

How to use on duplicate key in insert query builder in mysql. when data in array format

$data = [ ‘id’ => 1, ‘pic’ => png, ‘height’ => 122, ‘width’ => 23, ]; $this->db->insert(table_name, $data); How to use on duplicate key in insert query builder in MySQL data in array format. Thank You in advance. Source: Symfony…