mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-11 23:25:57 +01:00
2018-05-31 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up SQL errors in rdadmin(1).
This commit is contained in:
@@ -225,6 +225,25 @@ void RDApplication::log(RDConfig::LogPriority prio,const QString &msg)
|
||||
}
|
||||
|
||||
|
||||
bool RDApplication::dropTable(const QString &tbl_name)
|
||||
{
|
||||
bool ret=false;
|
||||
|
||||
QString sql=QString("show tables where ")+
|
||||
"Tables_in_"+config()->mysqlDbname()+"=\""+tbl_name+"\"";
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
sql=QString("drop table `")+tbl_name+"`";
|
||||
RDSqlQuery *q1=new RDSqlQuery(sql);
|
||||
delete q1;
|
||||
ret=true;
|
||||
}
|
||||
delete q;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void RDApplication::userChangedData()
|
||||
{
|
||||
app_user->setName(app_ripc->user());
|
||||
|
||||
Reference in New Issue
Block a user