|
@@ -238,13 +238,12 @@ bool ProjectService::SelectAllByPage(QList<ProjectInfo *> *projectInfoList, int
|
|
|
projectInfo->estimateType = query.value(11).toString();
|
|
|
projectInfoList->append(projectInfo);
|
|
|
}
|
|
|
-
|
|
|
- QString selectSqlAll = QString("SELECT * FROM t_project_info where project_name like %1 ").arg(name);
|
|
|
- if (query.exec(selectSqlAll)) {
|
|
|
- query.next();
|
|
|
- totalPages = query.value(0).toInt();
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
+ QString selectSqlAll = QString("SELECT COUNT(*) FROM t_project_info where project_name like %1 ").arg(name);
|
|
|
+ if (query.exec(selectSqlAll)) {
|
|
|
+ query.next();
|
|
|
+ totalPages = query.value(0).toInt();
|
|
|
+ qDebug() << "------------" << totalPages;
|
|
|
ret = true;
|
|
|
}
|
|
|
} else {
|