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

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -