Adam Marash
|
Posted: 04/15/2001, 1:27 PM |
|
How do I force CC to limit the number of returned records in a grid to a
certain number, without enabling page scrolling? For example, show only the
last 5 submitted messages, click More>> for all records...
|
|
|
Alexey Alexapolsky
|
Posted: 04/16/2001, 3:42 AM |
|
Use Form properties/SQL/Custom sql to limit number of records in a grid.
Like: select top 10 from items
Make "More >> " link to the same page wiht some paramater , say , http://yourhost.com/your_grid.asp?all=yes
Is Form properties/Events/Open event with code :
if GetParam("all")=yes then sSql = "select * from items"
This will redefine your sql.
sSql is a standard CC variable holding sql statement to be executed.
--
Regards,
Alexey
CodeCharge Support
Adam Marash <faxman@altavista.net> wrote in message
news:9bd07h$pmm$1@mail.tankhill.com...
> How do I force CC to limit the number of returned records in a grid to a
> certain number, without enabling page scrolling? For example, show only
the
> last 5 submitted messages, click More>> for all records...
>
>
|
|
|
Owen Lees
|
Posted: 04/16/2001, 8:20 AM |
|
Would you be so kind as to clarify this point for me..?
If you wish to only return 1 row from a db call (lets say the "newest" item)
I simply input a sql string into the sql box such as: select * from -db
table- LIMIT 0,1 where - argument - ??
Tried that and it complained bitterly!
Owen
Alexey Alexapolsky <alexa@codecharge.com> wrote in message
news:9beib1$f0i$1@mail.tankhill.com...
> Use Form properties/SQL/Custom sql to limit number of records in a grid.
> Like: select top 10 from items
>
> Make "More >> " link to the same page wiht some paramater , say ,
> http://yourhost.com/your_grid.asp?all=yes
> Is Form properties/Events/Open event with code :
> if GetParam("all")=yes then sSql = "select * from items"
>
> This will redefine your sql.
> sSql is a standard CC variable holding sql statement to be executed.
>
>
>
> --
> Regards,
> Alexey
> CodeCharge Support
>
>
>
> Adam Marash <faxman@altavista.net> wrote in message
>news:9bd07h$pmm$1@mail.tankhill.com...
> > How do I force CC to limit the number of returned records in a grid to a
> > certain number, without enabling page scrolling? For example, show only
> the
> > last 5 submitted messages, click More>> for all records...
> >
> >
>
>
|
|
|
Alexey Alexapolsky
|
Posted: 04/18/2001, 8:00 AM |
|
What error message did you receive , where, when?
I guess limit 0,1 will always return the first record .,
you will need to specify correct sort order of records in WHERE clause , for
some field containing date, so that limit 0,1 would really point to the
latest record.
--
Regards,
Alexey
CodeCharge Support
Owen Lees <jsmsports01@thefreeinternet.co.uk> wrote in message
news:9bf2jq$ceb$1@mail.tankhill.com...
> Would you be so kind as to clarify this point for me..?
>
> If you wish to only return 1 row from a db call (lets say the "newest"
item)
> I simply input a sql string into the sql box such as: select * from -db
> table- LIMIT 0,1 where - argument - ??
>
> Tried that and it complained bitterly!
>
> Owen
>
> Alexey Alexapolsky <alexa@codecharge.com> wrote in message
>news:9beib1$f0i$1@mail.tankhill.com...
> > Use Form properties/SQL/Custom sql to limit number of records in a grid.
> > Like: select top 10 from items
> >
> > Make "More >> " link to the same page wiht some paramater , say ,
> > http://yourhost.com/your_grid.asp?all=yes
> > Is Form properties/Events/Open event with code :
> > if GetParam("all")=yes then sSql = "select * from items"
> >
> > This will redefine your sql.
> > sSql is a standard CC variable holding sql statement to be executed.
> >
> >
> >
> > --
> > Regards,
> > Alexey
> > CodeCharge Support
> >
> >
> >
> > Adam Marash <faxman@altavista.net> wrote in message
> >news:9bd07h$pmm$1@mail.tankhill.com...
> > > How do I force CC to limit the number of returned records in a grid to
a
> > > certain number, without enabling page scrolling? For example, show
only
> > the
> > > last 5 submitted messages, click More>> for all records...
> > >
> > >
> >
> >
>
>
|
|
|
|