Browse Source

unimportant

master
Cosmin Apreutesei 2 months ago
parent
commit
720d2a3955
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      mysql.lua

+ 3
- 4
mysql.lua View File

@@ -665,12 +665,11 @@ function res.fetch(res, mode, t)
local field_count = C.mysql_num_fields(res)
local fields = fetch_fields and C.mysql_fetch_fields(res)
local row = fetch_row(res, numeric, assoc, decode, field_count, fields, t or {})
if not row then return nil end
if packed then
return row
elseif row then
return true, unpack(row)
else
return true
return true, unpack(row)
end
end

@@ -682,7 +681,7 @@ function res.rows(res, mode, t)
res:seek(1)
return function()
local row = fetch_row(res, numeric, assoc, decode, field_count, fields, t or {})
if not row then return end
if not row then return nil end
i = i + 1
if packed then
return i, row


Loading…
Cancel
Save