Code:
mysql> select * from nums order by n;
+------+
| n |
+------+
| 1 |
| 2 |
| 3 |
| 3 |
| 4 |
+------+
5 rows in set (0.00 sec)
mysql> update nums set n = n + 1 where n > 1;
Query OK, 4 rows affected (0.02 sec)
Rows matched: 4 Changed: 4 Warnings: 0
mysql> insert into nums (n) values (2);
Query OK, 1 row affected (0.00 sec)
mysql> select * from nums order by n;
+------+
| n |
+------+
| 1 |
| 2 |
| 3 |
| 4 |
| 4 |
| 5 |
+------+
6 rows in set (0.00 sec)
mysql>
... and of course you'll be storing the PHP constants in a separate file, making them easy to edit.
Bookmarks