Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
taka250 opened this issue Oct 26, 2022 · 0 comments
Open

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

taka250 opened this issue Oct 26, 2022 · 0 comments

Comments

@taka250
Copy link

taka250 commented Oct 26, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant