本文整理汇总了C++中CMySQLQuery::execStaticQuery方法的典型用法代码示例。如果您正苦于以下问题:C++ CMySQLQuery::execStaticQuery方法的具体用法?C++ CMySQLQuery::execStaticQuery怎么用?C++ CMySQLQuery::execStaticQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMySQLQuery
的用法示例。
在下文中一共展示了CMySQLQuery::execStaticQuery方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: flush
void CAdministrationWindow::flush(CMySQLServer *m, int flush_type)
{
QString f = QString::null;
switch (flush_type)
{
case FLUSH_HOSTS: f = "HOSTS";
break;
case FLUSH_LOGS: f = "LOGS";
break;
case FLUSH_PRIVILEGES: f = "PRIVILEGES";
break;
case FLUSH_TABLES: f = "TABLES";
break;
case FLUSH_STATUS: f = "STATUS";
break;
case FLUSH_TABLES_RL: f = "TABLES WITH READ LOCK";
break;
case FLUSH_DES_KEY_FILE: f = "DES_KEY_FILE";
break;
case FLUSH_QUERY_CACHE: f = "QUERY CACHE";
break;
case FLUSH_USER_RESOURCES: f = "USER_RESOURCES";
break;
}
CMySQLQuery *qry = new CMySQLQuery(m->mysql());
qry->setEmitMessages(false);
if (qry->execStaticQuery("FLUSH " + f))
m->messagePanel()->information("Flush " + capitalize(f) + " " + tr("successful"));
delete qry;
}