git-svn-id: svn://192.168.0.12/source@79 8346c931-da38-4b9b-9d4c-e48b93cbd075

This commit is contained in:
admin
2015-04-21 01:14:12 +00:00
parent f553261f78
commit a9a1caf793

View File

@@ -302,8 +302,12 @@ void SCrawler::saveFrameList(QWebFrame *frame)
QString strQuery = "delete from "; QString strQuery = "delete from ";
strQuery += m_strTable; strQuery += m_strTable;
strQuery += QString(" where article_url = 'http://%1'").arg(strUrl); strQuery += QString(" where article_url = 'http://%1'").arg(strUrl);
sql.exec(strQuery);
if (sql.exec(strQuery) == false)
{
cout << "error " << sql.lastError().text().toStdString();
cout << strQuery.toStdString();
}
//if (sql.size() == 0 || sql.size() == -1) //if (sql.size() == 0 || sql.size() == -1)
{ {
@@ -723,7 +727,13 @@ void SCrawler::saveFrameCafeList(QWebFrame *frame)
QString strQuery = "delete from "; QString strQuery = "delete from ";
strQuery += m_strTable; strQuery += m_strTable;
strQuery += QString(" where article_url = 'http://%1'").arg(strUrl); strQuery += QString(" where article_url = 'http://%1'").arg(strUrl);
sql.exec(strQuery);
if (sql.exec(strQuery) == false)
{
cout << "error " << sql.lastError().text().toStdString();
cout << strQuery.toStdString();
}
//if (sql.size() == 0 || sql.size() == -1) //if (sql.size() == 0 || sql.size() == -1)
{ {
QString strQuery = QString("insert into "); QString strQuery = QString("insert into ");
@@ -944,7 +954,12 @@ void SCrawler::saveFrameDaumCafeList(QWebFrame *frame)
QString strQuery = "delete from "; QString strQuery = "delete from ";
strQuery += m_strTable; strQuery += m_strTable;
strQuery += QString(" where article_url = 'http://%1'").arg(strUrl); strQuery += QString(" where article_url = 'http://%1'").arg(strUrl);
sql.exec(strQuery); if (sql.exec(strQuery) == false)
{
cout << "error " << sql.lastError().text().toStdString();
cout << strQuery.toStdString();
}
{ {
QString strQuery = QString("insert into "); QString strQuery = QString("insert into ");
strQuery += m_strTable; strQuery += m_strTable;