For coders TYPO3 Tech Corner

[MySQL] XML in MySQL and MariaDB: Write and read

[MySQL] XML in MySQL and MariaDB: Write and read

Example 1 - read XML part from database: Show path from table sys_file_storage:

select name, uid, ExtractValue(configuration, '//T3FlexForms/data/sheet[@index="sDEF"]/language/field[@index="basePath"]/value') path from sys_file_storage where uid > 0

Example 2 - write XML part into database: Set value in table tt_news:

UPDATE tt_content SET pi_flexform = UpdateXML(pi_flexform, '//T3FlexForms/data/sheet[@index="s_misc"]/language/field[@index="PIDitemDisplay"]/value', CONCAT('<value index="vDEF">', 123, '</value>' )) WHERE uid=11107

Back

"Code faster, look at the time" - does this sound familiar to you?

How about time and respect for code quality? Working in a team? Automated tests?

Join us