SELECT * FROM card_rundata WHERE TIME IN (SELECT TIME FROM card_rundata WHERE bushingid
=’%1’ )
子查询总是不能按照条件查出数据(应该没错),只能用如下方法:
QString Select_bushing =QString(“SELECT * FROM card_rundata WHERE bushingid
=’%1’ AND time
BETWEEN ‘%2’ AND ‘%3’ ORDER BY time
DESC”)
.arg(bushingid).arg(StartTime).arg(EndTime);
bool q_ok =query.exec(Select_bushing);
sql子查询
最新推荐文章于 2023-06-09 11:26:33 发布