hi all,
i have a code in stored procedure which adds 2tco
string to the
table in MySql database
i send this parameters on stored procedure
'4SR','09','foo'
and the error is
Procedure execution failed 1054 - Unknown column 'foo' in 'field list'
how to do resolve this?
here's the code
BEGINdeclare2tuni char(100);declare2tmonth int(2);declare2tyear int(4);declare2tco LONGTEXT;SET2tuni = tuni;SET2tmonth = tmonth;SET2tyear = YEAR(CURDATE());SET2tco = tco;SET@s = CONCAT('INSERT INTO t_contents_',2tuni,'_',2tmonth,'_',2tyear,' (contents) VALUES (',2tco,');');
PREPARE stmt FROM@s;EXECUTE stmt;END