This topic is locked
[SOLVED]

I always want to swap PNG for SVG via a button.

1/3/2022 6:48:13 AM
PHPRunner Tips and Tricks
A
Andreas G. author

Code snippets wanted, please

I always want to swap PNG for SVG via a button.

Would someone please help me?
thank you
Translated with Google

img alt

mbintex 1/3/2022

You will need a button with some "Update"-MySQL code in DB::Exec.

Look here

https://www.mysqltutorial.org/mysql-string-replace-function.aspx

https://www.mysqltutorial.org/mysql-update-data.aspx

If you don“t need it all the time, you could do it once via PHPMyAdmin or MySQL Workbench.

A
Andreas G. author 1/3/2022

I need it over 3000 times for different articles.

search and replace the entire table for characters,
I did it via phpMyAdmin, only this PNG must not be replaced everywhere

Sergey Kornilov admin 1/3/2022

You can update the whole table at once, see the provided links with examples. Nothing to do in PHPRunner, this needs to be done in phpMyAdmin or similar software.

A
Andreas G. author 1/4/2022
UPDATE products_description SET products_description = REPLACE(products_description, "PNG", "SVG")

This is just an example now!
It works but:
it may only be changed for certain IDs.

It should work in edit mode via a button