Adding method `numrows'.
This commit is contained in:
parent
47b1092bcc
commit
25fdac818c
@ -2,7 +2,7 @@
|
||||
** LuaSQL, MySQL driver
|
||||
** Authors: Eduardo Quintao
|
||||
** See Copyright Notice in license.html
|
||||
** $Id: ls_mysql.c,v 1.19 2004/12/14 19:27:05 eduquintao Exp $
|
||||
** $Id: ls_mysql.c,v 1.20 2006/01/25 20:24:35 tomas Exp $
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
@ -309,6 +309,15 @@ static int cur_getcoltypes (lua_State *L) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Push the number of rows.
|
||||
*/
|
||||
static int cur_numrows (lua_State *L) {
|
||||
lua_pushnumber (L, (lua_Number)mysql_num_rows (getcursor(L)->my_res));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Create a new Cursor object and push it on top of the stack.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user