We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17705
    • 501 Posts
    It is safe to use:

    UPDATE nametable SET menutitle=CONCAT(’0’,menutitle) WHERE type=’document’ AND parent=’value’ AND isfolder=’0’;

    ?

    The problem is that I need to add zero before the current menutitle stored value of several documents
    Like 300 documents...
      • 7923
      • 4,213 Posts
      Allready answered to this at irc, but here again: I think it’s safe to do that. (still, you should do a backup first)

      the parent and isfolder fields are the type of int, so use something like:
      UPDATE `modx_prefix_site_content` SET `menutitle` = concat( 0, menutitle ) WHERE `type` = ’document’ AND `isfolder` = 0 AND `parent` = folderid;


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 17705
        • 501 Posts
        Thanks a lot... it saved me a lot of clicks and time in the backend smiley