void GetP::Delete(CString name){
CString strSQL;
strSQL.Format("delete from mytable where name=\'%s\'",name);
if(mysql_real_query(&mysql,(char*)(LPCTSTR)strSQL,(UINT)strSQL.GetLength())!=0)
AfxMessageBox("删除失败");
else
AfxMessageBox("删除成功");
}
当把名字传进来后为什么不能删除呢,弹出删除失败。并且数据库以连接。