mysql - Assigning variables according to dynamic queries -


i'm creating function on local server in order calculate value, variables stored on different tables

set @tmquery = concat("select sum(x) table", year, " id = ", id);  prepare stmt @tmquery; set tm = (execute stmt); 

i need year , id values (which received parameters) in order filter information can sum() of relevant data, need save sum() value on different variable in order use afterwards, can in order accomplish this?


Comments

Popular posts from this blog

html - height not adding height to a empty div -

python - Robot Framework location and name of keyword -

Desktop Launcher for Python Script Starts Program in Wrong Path (Linux) -