Modelname is a string, you need to use array to store it.
PHP Code:
new tmp[32]
SQL_ReadResult(Query, 3, tmp, 31)
new tmp2[32]
copy(tmp2, 31, tmp) //I don't know why do you copy it to another variable, but this is how you do it with arrays
cs_set_user_model(id, tmp2 )
__________________