db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rakesh Chauhan" <rake...@cybage.com>
Subject Re: How to get specified number of entries?
Date Mon, 17 Mar 2003 10:06:24 GMT
Alternatively , you can try something like 
String strSql = "Select count( * ) from TABLE;
List Records = BasePeer.executeQuery( strSql );
int nTotalAds = ( ( Record )Records.get( 0 ) ).getValue( 1 ).asInt();
/rakesh
  ----- Original Message ----- 
  From: peter riegersperger 
  To: Turbine Torque Users List 
  Sent: Monday, March 17, 2003 3:25 PM
  Subject: Re: How to get specified number of entries?


  -----BEGIN PGP SIGNED MESSAGE-----
  Hash: SHA1

  On Monday 17 March 2003 10:38, Andras Balogh wrote:
  > Another solution (not so good) would be to use limit and offset properties
  > of the Criteria.
  > You could retrieve n+1 values (ex. 20+1) all the time to know that you 
  > have more values
  >  ahead or not. (if you need to add previous, next links)

  limit never worked for me (on mysql). it didn't get written into the 
  sql-statement.
  but ymmv of course.

  rick


  - -- 
  |-
  | peter riegersperger  <rick@subnet.at>
  |-
  | subnet
  | platform for media art and experimental technologies
  |-
  | http://www.subnet.at/
  |-
  | muehlbacherhofweg 5 // 5020 salzburg // austria
  |-
  | fon/fax +43/662/842 897
  |- 
  -----BEGIN PGP SIGNATURE-----
  Version: GnuPG v1.0.7 (GNU/Linux)

  iD8DBQE+dZubIMP39JYOy9IRAsE+AJ9S7KJREEPASAhBQ+RhYIeHGZW4fQCgjHbD
  dKm6dh2wyqU/npa2JfL6Qdg=
  =INaI
  -----END PGP SIGNATURE-----


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
  For additional commands, e-mail: torque-user-help@db.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message