We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Get the custom profile questions and their values from database. | Forum

victor
victor Mar 6 '15
Hello to everybody!


I'm developing an android application and I use the oxwall service to register the users, I know how to check the users from database, but I don't know how to retrieve the custom questions I make in the user profile and the values of the answers (the answers  are in radiobutton and multi-response form).


Can you explain me how to get this information or better, give an example of sql query?


Thank you so much!

Taissa Team
Taissa Mar 12 '15
Topic was moved from General Questions.
Nickolay
Nickolay Mar 12 '15

You can get them using API:


BOL_UserService::getInstance()->getUserViewQuestions($userId, $adminMode, array('FIELD_NAME_1', 'FIELD_NAME_2', 'FIELD_NAME_....'));


Or if you need it as a part of some custom SQL Query just join BOL_QuestionDataDao::getInstance()->getTableName() with desired field name.


moonwald
moonwald Aug 6 '15

Hi Nickolay 

according to you:


1) why the necessity to insert all the informations about users interests into a unique table as  ow_base_question_data?


I noticed that this table became so great!


For example 'questionName' is repeated multiple times

maybe was it better to create a relational table where to insert the link to the field question Name?


2) according to you for the migration to other database 

in order to have the same questions with multiple choice in the section QUESTIONS INTERESTS area

is it only necessary to make the dump of these tables?


ow_base_language_key

ow_base_question_data

ow_base_question_value

ow_base_question



Moonwald