![]() |
|
Updateing Codeblock with SQL Statement - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Translating (https://forum.zenphoto.org/forum-8.html) +--- Thread: Updateing Codeblock with SQL Statement (/thread-13747.html) |
Updateing Codeblock with SQL Statement - tw2003 - 18-09-2022 I need to update all codeblocks I used with several hundereds of my pictures as I want to change some things. This is the how the beginning of the codeblock field with the change looks in phpmyadmin: Updateing Codeblock with SQL Statement - acrylian - 18-09-2022 You can have several codeblocks so the data is stored seralized. You have to cover that with your statement. I fear you cannot do this via MySQL easily directly. BEtter use PHP and Zenphoto's object model for this:
Each object has methods for these tasks. Also: If you do things like this perhaps consider to edit the theme itself (using the multiple_layouts plugin for example). Codeblocks are rather a workaround for simple calls. Today I would not introduce them as a feature anymore. Just beacuse maintainance is quite a pain if you used them a lot in various ways… Updateing Codeblock with SQL Statement - tw2003 - 20-09-2022 Thanks for explaining. At least I was not too stupid to do the correct SQL statement :-) |