Zdravim. Muzete mi nekdo vysvetlit jak funguje tento priklad
char query[1000],*end;
end = strmov(query,"INSERT INTO test_table values(");
*end++ = '\'';
end += mysql_real_escape_string(&mysql, end,"What is this",12);
*end++ = '\'';
*end++ = ',';
*end++ = '\'';
end += mysql_real_escape_string(&mysql, end,"binary data: \0\r\n",16);
*end++ = '\'';
*end++ = ')';
if (mysql_real_query(&mysql,query,(unsigned int) (end - query)))
{
fprintf(stderr, "Failed to insert row, Error: %s\n",
mysql_error(&mysql));
}
nebo celkove jak funguje fce mysql_real_escape_string. Tenhle priklad je ze stranek mysql.com ale nejak to porad nemuzu pochopit... http://dev.mysql.com/doc/refman/5.1/en/mysql-real-escape-string.html
predem dik