Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Change Data Type of attribute fields in token table.

More
7 hours 25 minutes ago #274126 by Kevinsky
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.16.15
Own server or LimeSurvey hosting: Own server
Survey theme/template:
==================
I want to change the data type of one of the attribute_# fields LS creates in a token table, is this objectionable to the functioning of Limesurvey in any way? (outside of the obvious that the content of the field has to match the data type ofcourse)

When you create additional attribute field in a survey LS creates these as TEXT fields in the database.
I'd like to change the data type of a field that always has some sort of numeric id to integer to be able to use it properly in joins and such.

Please Log in to join the conversation.

More
2 hours 19 minutes ago #274130 by Joffm
Hi,
as far as I understand you do not talk about the LS function "join()".

Maybe you talk about JOINs related to MySQL, or.
This means you want to directly access the database, which is not really covered in this forum.

Anyway: What is your concern?
For each survey there is a token table. Did you try to change the datatype of an additional attribute in phpMyAdmin or another tool?
There shouldn't be any issue.

On the other side I do not see your concern about the TEXT type.
If there are issues you can use the function "cast()" to get an integer.

As you see I do not quite understand. 
Please, explain a bit more and send the lss export of a prototype where an additional attribute of type TEXT leads to a wrong result.

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose