Skip to content

REPLACE AND INSERT ... ON DUPLICATE KEY UPDATE support in Explorer #305

Open
@tprochazka

Description

@tprochazka

Would be really useful to have

$this->db->table('table')->replace()

It is the same like INSERT, just with REPLACE is used

Or

$this->db->table('table')->inserOrUpdate($newData, $updateData)

Useful when update should for example increment some column, change date, etc.

Reference:
https://dev.mysql.com/doc/refman/8.0/en/replace.html
https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions