You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2018. It is now read-only.
For example, if the table contains 1 and 2 in the id column
and 1 is updated to 2 before 2 is updated to 3, an error occurs.
To avoid this problem, add an ORDER BY clause to cause the rows
with larger id values to be updated before those with smaller values:
UPDATE t SET id = id + 1 ORDER BY id DESC;
It would be nice to have an extra param to specify order:
$db->update($table, $where, $order);
The text was updated successfully, but these errors were encountered:
Jira Information
Description
It is not possible to run a query link this:
UPDATE t SET id = id + 1 ORDER BY id DESC;
UPDATE t SET id = id + 1;
For example, if the table contains 1 and 2 in the id column
and 1 is updated to 2 before 2 is updated to 3, an error occurs.
To avoid this problem, add an ORDER BY clause to cause the rows
with larger id values to be updated before those with smaller values:
UPDATE t SET id = id + 1 ORDER BY id DESC;
It would be nice to have an extra param to specify order:
$db->update($table, $where, $order);
The text was updated successfully, but these errors were encountered: