stringstream query;
char *iconNotMySQL=(char*)malloc(icon.length()); // icon is a c++ stl string of the icons data
char *iconMySQL=(char*)malloc((icon.length() * 2) + 1);
memcpy(iconNotMySQL, icon.c_str(), icon.length());
mysql_real_escape_string(&mysql, iconMySQL, iconNotMySQL, icon.length());
query << "UPDATE members SET email = \"" << email << "\", "
<< "location = \"" << loc << "\", "
<< "bio = \"" << bio << "\", "
<< "showemail = \"" << showemail << "\", "
<< "icon = \"" << iconMySQL << "\" "
<< "WHERE username = \"" << name << "\"";
MaGmysql_query(query.str());when I check the length of query.str() it looks exactly as it should, but not all the data is inserted into the database. can anyone help me out?
thanks chris
