How get the name for spec active of the character, from character database

Hi, I’m making a web site for Mist of Pandaria, I need for the profile of the character, know which is the specialization that is active, and also the name of the two specializations that have the character on character database.

Greetings and thanks.

Close the post, I found the solution

Could you post the solution? So that others with the same problem can search in the forums.

In the character table of the Trinity database for version Mist of Pandaria, there are 4 fields:

speccount: This field contains how many specializations have the character.
activespec: This field contains which specialization is active, it has value 0 or 1
specialization1: This field contains the ID of the especialización1 in the ChrSpecialization.dbc file for the core of Mist of Pandaria.
specialization2: This field contains the ID of the especialización2 in the ChrSpecialization.dbc file for the core of Mist of Pandaria.

The solution was to incorporate a table in the database of the web site that I’m developing with the values of ChrSpecialization.dbc file, so to locate the active specialization, I take the ID for the active specialization, that I can be obtained from the character table, then I found on my database the name of specialization with the ID.