春哥 我遇到一个问题
local id = ngx.var.id
local sql = 'select id,banner,pv, uv from aditems where id '
sql = table.concat({sql,id-10},'>=')
res, err, errno, sqlstate = db:query(sql)
if res then
local data = "">
data = cjson.decode(data)
for i, res in ipairs(data) do
if res.id == id then
--这里不执行
else
ngx.say(res.id,'=>',id)
end
end
end
18=>28
19=>28
20=>28
21=>28
22=>28
23=>28
24=>28
25=>28
26=>28
27=>28
28=>28
29=>28
30=>28
31=>28
32=>28
33=>28
绿色加粗这里 看上去是一样的字符串 为什么 红色加粗那个地方代码不运行