Suppose we have 1000 rows in the database i need to retrive 200 rows per page, then which approach is better either struts based or non struts based it is an interview question

Showing Answers 1 - 4 of 4 Answers

kishor

  • Jul 22nd, 2006
 

In case if you are using MySql database just you need to keep a hidden variable of page no and put the limit clouse in Sql query.

see as like this

PerPageRecord = 200

RecordStartfrom = (PageNo * PerPageRecord);

SqlString = "select * from table_name limit " + RecordStartfrom + " , " + PerPageRecord;

Take it

Kishor

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions