We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37550 ☆ A M B ☆
    • 711 Posts
    Hi all,

    I’m preparing to write my first module + snippet

    To give you an idea I’m looking at writing a Worldpay module which would give the user the following screens:

    Summary | Subscriptions | Donations | Settings | Help

    Basically the module will show data to the admin user to how many subscriptions / donations they have received by querying the database and allow them to setup in settings donation amounts & subscription amounts.

    I’ve searched the forum but cannot find the best way to store the data as ideally it would need to be stored in mysql for easy access, should i create a new table within the modx database? or create a new database and provide the modx module the login details? huh

    Any suggestions would be much appreciated.

    Thanks
    Aaron
      http://www.onesmarthost.co.uk
      UK MODX Hosting with love.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You can create your tables in the same database, but with different table prefixes, so that there won’t be any chance of conflicts. That way you can still make use of the same $modx db API functions.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 37550 ☆ A M B ☆
        • 711 Posts
        Sounds great to me, I will look into doing that.

        :) smiley

        I’m sure I will be back sooner or later with more Questions.

        Thanks
          http://www.onesmarthost.co.uk
          UK MODX Hosting with love.