Hi, users. I am trying to fetch language from database through freeswitch dbh after user presses some digits on main message. Database table structure is as follow. Id Did inp_1 inp_2 inp_3 1 14045872020 <14048002020> english chinese hindi *input* = session:playAndGetDigits(1, 1, 3, 3000, "#",main_msg, "/error.wav", "\\d") session:consoleLog("info", "Caller pressed : ".. input .."\n") sql ="select inp_"..input.." from bible_main where Did = "..Dest session:consoleLog("info", "SQL : ".. sql .."\n") dbh:query(sql, function(row) * lang = row.inp_..input* session:consoleLog("info", "Caller has Selected : ".. lang .."\n") end) Running above code gives me below error. 2015-05-17 02:26:20.057184 [ERR] mod_lua.cpp:103 /usr/local/freeswitch/scripts/bible.lua:27: attempt to concatenate field 'inp_' (a nil value) stack traceback: /usr/local/freeswitch/scripts/bible.lua:27: in function </usr/local/freeswitch/scripts/bible.lua:25> [C]: in function 'query' /usr/local/freeswitch/scripts/bible.lua:25: in main chunk Actually, i do not know how to concatenate a table value with string so that it reflects the table column. So, i can get value from this. Running it like this, gives perfect result. dbh:query(sql, function(row) * lang = row.inp_1* session:consoleLog("info", "Caller has Selected : ".. lang .."\n") end) But I want user's input not some hard coded values for input. Any help in this regard. Thanks.