Use excerpt blocks for all posts

This commit is contained in:
Oliver Davies 2018-03-01 07:27:33 +00:00
parent a813a83317
commit 6ad54f56d7
32 changed files with 130 additions and 16 deletions

View file

@ -10,8 +10,11 @@ tags:
- textmate
use: [posts]
---
{% block excerpt %}
As in [the original post](/blog/add-taxonomy-term-multiple-nodes-using-sql/ "Quickly adding a taxonomy term to multiple nodes using SQL"), I'd generated a list of node ID values, and needed to add structure the SQL update statment formatted in a certain way. However, I changed my inital query slightly to out put the same nid value twice.
{% endblock %}
{% block content %}
```language-sql
SELECT nid, nid FROM node WHERE TYPE = 'blog' ORDER BY nid ASC;
```
@ -36,3 +39,4 @@ All 31 lines have been changed.
Next, I can use `\n` to target the lines between the rows. I'll replace it with the next comma, the number 63 (the tid value), the closing bracket, another comma, re-add the line and add the opening bracket.
The only two lines that aren't changed are the first and last, as they don't have any line breaks following them. I can complete these lines manually. Now all I need to do is add the beginning of the SQL update statement, then copy and paste it into Sequel Pro.
{% endblock %}