From e924f0f659c693cd72088047bbe9373623fd6f34 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Wed, 24 Apr 2019 06:27:05 +0000 Subject: [PATCH] One more code block fix --- ...011-08-08-database-best-practices-for-future-scalability.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/markdown/2011-08-08-database-best-practices-for-future-scalability.md b/markdown/2011-08-08-database-best-practices-for-future-scalability.md index be496a7..05e3a5d 100644 --- a/markdown/2011-08-08-database-best-practices-for-future-scalability.md +++ b/markdown/2011-08-08-database-best-practices-for-future-scalability.md @@ -36,8 +36,7 @@ Then, things that cost development time, in increasing order of complexity: 1. Stop using AUTO\_INCREMENT. Instead, keep a table [IdSequences](http://www.reddit.com/r/mysql/comments/jcw8o/database_best_practices_for_future_scalability/c2b2o4v), and do something like: - ``` - BEGIN; + ```BEGIN; UPDATE IdSequences SET LastId=LAST_INSERT_ID(LastId+Increment) WHERE TableName='A' AND ColumnName='b'; INSERT INTO A (b, c) VALUES (LAST_INSERT_ID(), ‘foo’);