qicosmos / ormpp

modern C++ ORM, C++17, support mysql, postgresql,sqlite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

使用order,类似“ORDER BY datetime ASC LIMIT 0,50”查询为空(在mysql直接执行可以成功),若在前面加上"where id = xxx"之类能成功?请问这是什么原因?

BisonReto opened this issue · comments

auto result = query("ORDER BY datetime ASC LIMIT 0,50"); 查询为空
auto result = query("where id = 1 ORDER BY datetime ASC LIMIT 0,50"); 查询为存在数据

知道啥原因,知道如何解决,加个1=1就可以了

我不觉得加1=1 是个好主意,应该让ormpp 内部去处理。 @Jacyking 你提个pr 处理一下吧。

已修复