cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marty McClelland" <mmcclell...@eduprise.com>
Subject Re: Esql row-results
Date Fri, 12 Apr 2002 02:15:57 GMT
from the mysql manual -

The LIMIT clause can be used to constrain the number of rows returned by the
SELECT statement. LIMIT takes one or two numeric arguments. The arguments
must be integer constants. If two arguments are given, the first specifies
the offset of the first row to return, the second specifies the maximum
number of rows to return. The offset of the initial row is 0 (not 1):
mysql> select * from table LIMIT 5,10;  # Retrieve rows 6-15
If one argument is given, it indicates the maximum number of rows to return:
mysql> select * from table LIMIT 5;     # Retrieve first 5 rows
In other words, LIMIT n is equivalent to LIMIT 0,n.


marty
----- Original Message -----
From: "Sharat Koya" <sxk99c@Cs.Nott.AC.UK>
To: <cocoon-users@xml.apache.org>
Sent: Thursday, April 11, 2002 10:00 PM
Subject: Re: Esql row-results


> unfortunatly not. I am using mysql
> ----- Original Message -----
> From: "Chris Warr" <ChrisW@esd.nec.com.au>
> To: <cocoon-users@xml.apache.org>
> Sent: Friday, April 12, 2002 3:02 AM
> Subject: RE: Esql row-results
>
>
> > does 'select top 1 ....' do what you want.  It just returns one row of
the
> > query results.  Not sure if all dbs support it though.  Very handy
though.
> >
> > Chris.
> >
> > -----Original Message-----
> > From: Sharat Koya [mailto:sxk99c@Cs.Nott.AC.UK]
> > Sent: Friday, 12 April 2002 11:54
> > To: cocoon-users@xml.apache.org
> > Subject: Esql row-results
> >
> >
> > Hi, I have searched through the archives over the past hour and haven't
> > found anything for this problem.
> >
> > What I want to do is execute a esql query that returns the results from
a
> > table but only selects the first row. eg..
> > normal esql namespace excluded...
> >
> > <query>select * from action where due &lt; current_timestamp</query>
> > <results>
> >  <row-results>
> >   <action><get-string column="action"/></action>
> >  </row-results>
> > </results>
> > what i want to be able to do is return only one action and ideally the
> first
> > one it comes across. Once it does i can then set about processing the
> action
> > and then delete from the database.
> >
> > any ideas?
> >
> > thanks for any time put in
> >
> > Sharat Koya
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> >
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message