I have the following data stored in string ;
string name = "gokera atoram"
And, I want send this using sql command in c++
mysql_query ( ... , ? ) ;
What should I write to the place marked with ‘?’ ?
command :
insert into Names values ( name );
EDIT:
further information, I take data from standart input
cin >> name
mysql_query ( …, ? )
if I write like “insert … ( name ) “, name will be treated as string not as variable name .
Take a look at the documentation.
It says:
I guess this example could be helpful