We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15001
    • 697 Posts

    Is there some module or equivalent to easily delete all the chunks from a category ?

    Thanks.
      • 4310
      • 2,310 Posts
      I would definitely backup the DB, or at least that table before doing either of the delete options below!

      Where 99 is the category id you require :

      From PHPMyAdmin you could run this SQL
      DELETE FROM `modx_site_htmlsnippets` WHERE `category`=99

      Or write a snippet with this code in it and call it on a page :
      $sql = 'DELETE FROM `modx_site_htmlsnippets` WHERE `category`=99'; 

        • 15001
        • 697 Posts
        That’s very nice. Thank’s a lot.
        I assume that I can do someting similar with template variables, a.s.o., using the proper table.

        Your answer could not be at a better time since I was just trying to figure out if phpMyAdmin was installed or not.
        My site is ready and I have to move it to the hosting server.
        I plan to export the MySQL database using phpMyAdmin. It comes with xampplite, but I don’t know if it is already installed or if I have to run the setup script.
        How can I know if phpMyAdmin is already installed ?
          • 4310
          • 2,310 Posts
          Usually PHPMyAdmin is in the bin folder in the root of your web server install, at least it is on MAMP & Wampserver
            • 15001
            • 697 Posts
            Usually PHPMyAdmin is in the bin folder in the root of your web server install
            Yes it is, but I don’t know if it was installed during xampplite setup or just unzipped.
            I read somewhere that phpMyAdmin launches when typing "http://localhost/mysql" (at least with some packages).
            It was not the case.

            There is some "mysql" folder at the root of my server. And also the phpMyAdmin folder with a config.inc.php file inside.
            I assume that phpMyAdmin was not installed yet.
            But what is strange is that there is also some \mysql\data\phpmyadmin folder with lot of files inside.

            How do you launch your phpMyAdmin ?
            Which PHP script starts phpMyAdmin ?

            Thanks in advance.
              • 15001
              • 697 Posts
              I just had to type http://localhost/ to access to xampplite interface and then click the phpMyAdmin tool.

              For xampplite users, phpMyAdmin is preinstalled and can be accessed directly like at this url :
              http://localhost/phpmyadmin/

              Regards.