lua-resty-mysql icon indicating copy to clipboard operation
lua-resty-mysql copied to clipboard

can not use "not res" to judge if the 'res' is empty table

Open taka250 opened this issue 3 years ago • 0 comments

the Synopsis in readme use local res, err, errcode, sqlstate = db:query("drop table if exists cats") if not res then ngx.say("bad result: ", err, ": ", errcode, ": ", sqlstate, ".") return end "not res" cannot judge you shoud use next(use) or calculate the length to judge

taka250 avatar Oct 26 '22 08:10 taka250