mirror of https://github.com/luapower/mysql.git
unimportant
This commit is contained in:
parent
afadb60a14
commit
720d2a3955
|
@ -665,12 +665,11 @@ function res.fetch(res, mode, t)
|
||||||
local field_count = C.mysql_num_fields(res)
|
local field_count = C.mysql_num_fields(res)
|
||||||
local fields = fetch_fields and C.mysql_fetch_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 {})
|
local row = fetch_row(res, numeric, assoc, decode, field_count, fields, t or {})
|
||||||
|
if not row then return nil end
|
||||||
if packed then
|
if packed then
|
||||||
return row
|
return row
|
||||||
elseif row then
|
|
||||||
return true, unpack(row)
|
|
||||||
else
|
else
|
||||||
return true
|
return true, unpack(row)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -682,7 +681,7 @@ function res.rows(res, mode, t)
|
||||||
res:seek(1)
|
res:seek(1)
|
||||||
return function()
|
return function()
|
||||||
local row = fetch_row(res, numeric, assoc, decode, field_count, fields, t or {})
|
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
|
i = i + 1
|
||||||
if packed then
|
if packed then
|
||||||
return i, row
|
return i, row
|
||||||
|
|
Loading…
Reference in New Issue