• Resolved DolphinGuy

    (@sanyadolpins)


    Hi Ron,

    I have been running on several different setups, and Shardb continues to work flawlessly, including now on GAE and also DigitalOcean.

    My question today relates to creating and/or copying custom tables to the different databases. I need to create a table for each user every-time a user is created. This table is a customized table which is in addition to the standard WordPress tables.

    What I would like to know is, 1.) Where should I put the original table in order that it be created each time when creating a new user, 2) How do I copy or duplicate the table each time a new user is created and, 3) Is there anything special I need to do so that the new table is accessible from one of the random databases it was placed into?

    Thanks again for your help and advice in advance.

    DolphinGuy

    https://www.ads-software.com/plugins/shardb/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    I need to create a table for each user every-time a user is created.

    Depending on the number of users you expect to have you should probably create user specific tables in the global DB.

    Thread Starter DolphinGuy

    (@sanyadolpins)

    Ron,

    Maybe I am missing something. However, I have created a table in the Global DB and then created several new users. That table is ‘not’ created along with the new user. Is there something else I need to do?

    DolphinGuy

    Plugin Author Ron Rennick

    (@wpmuguru)

    That table is ‘not’ created along with the new user. Is there something else I need to do?

    You would need to hook into the user creation process and create the table in your hook.

    Thread Starter DolphinGuy

    (@sanyadolpins)

    Works great now, locally, thanks! Case closed.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to create and copy custom tables?’ is closed to new replies.