I have a table in which I need to concatenate values from verse table to chapter table. This should be done only when the verse field value starts with a caret('^'). They both share entity_id column.
I made the following select query, and got the values I need :
SELECT
chapter.field_bible_chapter_value,
verse.field_bible_verse_value,
verse.entity_id
FROM field_data_field_bible_verse AS verse
INNER JOIN field_data_field_bible_chapter AS chapter
ON chapter.entity_id = verse.entity_id
WHERE verse.field_bible_verse_value LIKE '^%'
ORDER BY verse.entity_id
Now I am stuck trying to use this data to make actual changes to the chapter field.
How should I approach this?