I have a field in a sulu cms database.
Table phpcr_nodes and field props
This field is stocked in XML like this:
<?xml version="1.0" encoding="UTF-8"?>
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<sv:property sv:name="i18n:en-description" sv:type="String" sv:multi-valued="0">
<sv:value length="2560">MY FIRST ITEM</sv:value>
</sv:property>
<sv:property sv:name="i18n:en-subtitle" sv:type="String" sv:multi-valued="0">
<sv:value length="28">MY SECOND ITEM</sv:value>
</sv:property>
</sv:node>
I would like to catch the value
<sv:value length="2560">MY FIRST ITEM</sv:value>
and
<sv:value length="28">MY SECOND ITEM</sv:value>
I have tried something like this:
SELECT
SUBSTRING_INDEX(ExtractValue(props, '//sv:name="i18n:en-subtitle"'), ' ', 1) AS `subtitle`
from phpcr_nodes
It's a MySQL database, how can I get the value in SQL ?
Thanks in advance