Created
January 17, 2020 16:56
-
-
Save nicl/e239ed56da2d2771380d1a51219a6deb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
talk_node.nid as id, | |
talk_meta.title as title, | |
node__field_talk_description.field_talk_description_value as description, | |
speaker_meta.title as author, | |
talk_meta.created as timestamp, | |
DATE_FORMAT(FROM_UNIXTIME(talk_meta.created), '%d/%m/%y') as date | |
from | |
node as talk_node, | |
node as speaker_node, | |
node__field_talk_description, | |
node_field_revision as talk_meta, | |
node_field_revision as speaker_meta, | |
node__field_speaker | |
where | |
talk_node.nid = node__field_talk_description.entity_id AND | |
talk_node.vid = talk_meta.vid AND | |
node__field_speaker.revision_id = talk_node.vid AND | |
node__field_speaker.field_speaker_target_id = speaker_node.nid AND | |
speaker_node.vid = speaker_meta.vid | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mysql --batch -e ".."
was what I used for tab-separated results. This is fine as fortunately we don't use tabs in our titles or descriptions, but it's not particularly robust as a solution.