【发布时间】:2011-06-15 08:20:01
【问题描述】:
本地函数getList()
local select_stmt = db:prepare("SELECT * FROM list")
return select_stmt:rows();
end
local rows = getList();
--**here i need to print the rows list, how I can print using for loop**
--************************************************
**here I want to fetch single record, I am unable to fetch and print it?**
local function getListRecord(listId)
local select_stmt = db:prepare("SELECT * FROM list where id = ?")
select_stmt:bind_names{ id = listId }
return select_stmt:get_unames()-- i AM GETTING ERROR HERE
end
local row = getListRecord(3);
--I am unable to get the row here, please help me
【问题讨论】: