From ad48fb212356c85abddd8e73012d80e72000fc20 Mon Sep 17 00:00:00 2001 From: Cosmin Apreutesei Date: Wed, 17 Sep 2014 22:53:32 +0300 Subject: [PATCH] field_count() and param_count() returns Lua number on x64 --- mysql.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mysql.lua b/mysql.lua index eef1b81..017df84 100644 --- a/mysql.lua +++ b/mysql.lua @@ -768,8 +768,14 @@ function stmt.affected_rows(stmt) end stmt.insert_id = C.mysql_stmt_insert_id -stmt.field_count = C.mysql_stmt_field_count -stmt.param_count = C.mysql_stmt_param_count + +function stmt.field_count(stmt) + return tonumber(C.mysql_stmt_field_count(stmt)) +end + +function stmt.param_count(stmt) + return tonumber(C.mysql_stmt_param_count(stmt)) +end function stmt.errno(stmt) local err = C.mysql_stmt_errno(stmt)