We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15510
    • 70 Posts
    I have a bunch of data that I want to import to documents. What is the best way to do this? SQL INSERT?
      • 10487 MODX Staff
      • 1,535 Posts
      What format do you have the data in?

      One of the things I sometimes do is write a little ’run once’ snippet to do the data processing and handle the inserts into the database (works pretty well for CSV files at least)

        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 15510
        • 70 Posts
        When you say "snippet", you mean in the MODx sense? I’m sorry to say that I am just a PHP hack. I was thinking more along the lines of parsing the data I have into SQL INSERT commands and targeting a table through phpMyAdmin. I don’t know which table to target and whether there is danger of trashing my database because I mistreated some referential integrity rules. The data will be in various forms.