I am using LuaSQL, and query for a result set using con:execute(sql_stmt), which returns a cursor.
How do I see if there is at least one row in that resultset, without doing a cursor:fetch to pop that first row?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the doc it appears you can use cur:numrows() if you are using MySQL, PostgreSQL, or Oracle: