Store additional fields in my custom database table?

Discussion in 'Customization & add-ons' started by socaluser, Sep 28, 2007.

  1. socaluser

    socaluser New Member

    Joined:
    Sep 28, 2007
    Messages:
    2
    Rather than storing additional fields in the amember_members table, I'd like to store those additional fields in a new table I'd create, for instance:

    create table mytable (
    member_id int,
    favorite_movie varchar(255),
    favorite_music varchar(255) )

    Where member_id corresponds to the same field in the amember_members table. I'd create/update each row depending on what the user enters in the signup/members form, and delete the row when the corresponding row in the amember_members table is deleted.

    Is this going to be overly complicated or problematic? Is there an example showing how to get that information from the forms and put them into the database and then manage the new table? Or, what hooks do I need to be able to do this?
  2. socaluser

    socaluser New Member

    Joined:
    Sep 28, 2007
    Messages:
    2
    Update

    To do this, I created an "integration plugin" which creates/deletes a database entry when a user signs up/cancels. An additional page allows them to edit that database entry (favorite music, etc.) That additional page is separate from the standard amember pages.

Share This Page