Don't fail when query_row() is called with an empty SELECT.

This commit is contained in:
Alexey Kopytov
2018-03-23 19:13:52 +03:00
parent ce5a14b50a
commit 7b383cc537
4 changed files with 17 additions and 2 deletions

View File

@ -299,7 +299,7 @@ end
function connection_methods.query_row(self, query)
local rs = self:query(query)
if rs == nil then
if rs == nil or rs.nrows == 0 then
return nil
end