We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44271
    • 6 Posts
    Hello,
    I want to add a new column in my existing table. So tell me how I can add a new column in any existing table in modx.
      • 4172
      • 5,888 Posts
      are you talking about adding records programmatically inside a custom-script by using xpdo? do:
      
      $fields['title'] = 'your title';
      $fields['description'] = 'your description';
      
      $object = $modx->newObject('yourXpdoClass');
      $object->fromArray($fields);
      $object->save();
      


      Or adding some records from frontend with a form ? use formit2db
      Or do you want to add/edit records with a backend-APP (CMP)? use MIGXdb
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 4172
        • 5,888 Posts
        sorry, was missreading the topic.

        if you have a xpdo-schema add the columns to your schema and use the MIGX-CMP -> do 'add fields'
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!