-3

Actually, I need to do pagination.

How do I do pagination by using a bunch of array data in CakePHP?

For an urgent fix I have handled my code by using JavaScript pagination. Is it only possible by using the model? Can't we do pagination with array data?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
KARTHI SRV
  • 499
  • 4
  • 20

2 Answers2

1

In Oracle 12c or later, you can write:

select *
from table
order by id desc
fetch first 1 row only
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Hassan Abbasi
  • 272
  • 1
  • 3
0

Try select * from YourtableName where rowid in (select max(rowid) from YourtableName)

mayowa ogundele
  • 475
  • 2
  • 6
  • 19