Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

insert variables into MYSQL (no replies)

$
0
0
int f = 23;
mysql_query(connect,"INSERT INTO t(d) VALUES(%d)",f);

lets say f for the above case is an unknown integer obtained from another function, How do i insert the value f into mysql. The above statement gives me an error of:

error C2660: 'mysql_query' : function does not take 3 arguments

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>