Skip to content

Incremental way of taking the id of a record & update #2

@ktharindu

Description

@ktharindu

By Assuming the next id as the wanted record may lead to data inconsistencies. It's a bad programming practice to consider assumptions on data and update records.

$query = 'UPDATE ' . $config_table;
$query .= ' SET value="' . $livechat_groups . '"';
$query .= ' WHERE config_id=' . ++$license_id;
$write->query($query);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions