在一个营养餐中,我通常在C内使用印本建造一个MySQL的盘问场。
i.e.
sprintf(sqlcmd,"update foo set dog="lab" where description="%s"",some_desc);
mysql_query(some_conn,sqlcmd);
然而,如果有些_像Crazy 5” Dog,那么MySql服务器会 s,因为它混淆了 d语。
Is it best, within C, to scan some_desc replacing " with "", OR is there a function in MySql to wrap this better... i.e. description=string(Crazy 5" Dog) ?
感谢!