Let's explain myself.
In my SQLite table, i have fields. Some of these are called j_weight1, j_weight2, j_weight3, j_weight4 and j_weight5
I never need more than one of these "j_weightX" returned by a SELECT.
Then I just create a variable ("weight"), and I give it as value the field "j_weightX" I need.
Then, I ask the SELECT to return me the field "? as weight2", with the variable "weight" in the data brackets.
Now, I think SELECT will put in a data "weight2" the value it found in the "j_weightX" field called.
And... I'm wrong.
In "weight2", select return me... the value of the variable "weight" : The NAME of the field. Not it's value.
What am I doing wrong ?
var weight = "j_weight"+(tired+2);
tx.executeSql('SELECT s_name,s_screen_name,[COLOR="#0000FF"]? as weight2[/COLOR],fighter.r_id FROM special,joinracespec,fighter WHERE joinracespec.s_id=special.s_id AND joinracespec.r_id=fighter.r_id AND f_id=? AND f_tiredness<=s_fatigue' , [[COLOR="#0000FF"]weight[/COLOR],nbfighter], function (tx, data)