mysql update problem

Hey all, I am beginner in mysql and i have some problem with update in mysql C++.
I am checked forum, but im not finded it..

// its correct
mysql_query(&mysql, "UPDATE uzivatelia SET x = 10 where id = '1'");

// and this does not work, why?
int yi = 10;
mysql_query(&mysql, "UPDATE uzivatelia SET x = yi where id = '1'");


Thanks!
Topic archived. No new replies allowed.