This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes mysql_num_rows equivalent in JSP. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "mysql_num_rows equivalent in JSP." Watch "mysql_num_rows equivalent in JSP." New topic

mysql_num_rows equivalent in JSP.

zohaib khan

Joined: Apr 13, 2009
Posts: 22

I am developing pagination in JSP.

I want to get number of records return by query.

In PHP we have function mysql_num_rows which give count of rows return by query.

Any idea how to get number of rows in JSP.

- Thanks
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60732

JSP is a view technology. You'd use JDBC to obtain the number of rows. I've moved this to the JDBC forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: mysql_num_rows equivalent in JSP.
Similar Threads
returning # of rows from sql query
returning # of rows from sql query
Selecting random rows
How to find the current sizes of the tables in a Database?
Program Optimization