1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Getting Fields from a separate database.

Discussion in 'XenForo Development Discussions' started by thedjtrollin, Mar 10, 2014.

  1. thedjtrollin

    thedjtrollin Member

    Hey Guys!

    I'm not really a Website Developer so I am a bit confused. Anyone who can help I will love!

    Here we go;

    Basically I have a Database called Core in this it has a Table called users. This users has a Field called Coins. I basically need to get the Data from the Coins field and put it
    [​IMG] in Server Coins field here.

    Problem is I have no idea how!

    Thanks in advanced<3
  2. Brogan

    Brogan XenForo Moderator Staff Member

    That's going to require custom development.
    You say you're not a developer so you would be better off contracting someone to do this for you.

    I would recommend adding a new column to the xf_user table and storing the data there, which would then make it more easily available in the XenForo code and templates.
    You can pull the data from your "core" database either as a one off or periodically.
  3. thedjtrollin

    thedjtrollin Member

    Hmmm I suppose I could use a MySQL event every Hour to do that and update the Coins from Core to xf_user.

    How would I retrieve Coins from the XF_users thou?

    *Like to point out I am a Java Developer not a Web Developer* So I know roughly whats going on xD
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You could start by dumping the $visitor record ({xen:helper dump, $visitor}) in that template (forum_list).

    If the query grabs all fields from the table then by adding your column to it, it would automatically be included in the $visitor record.
    Then you can just edit the template to add it using $visitor.coins.
  5. Zanthor

    Zanthor Member

    Attached Files:

Share This Page