CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Return Maximum Number of Records

Print topic Send  topic

Author Message
DataDoIt
Posted: 02/18/2004, 6:16 PM

CCS2; PHP4; MySQL4

Is there a way in CCS to globally set the maximum number of records that
would ever be returned from any search, without altering the total number of
real records found value?

-Mike R.

Michael Mikkelsen
Posted: 02/25/2004, 4:57 PM

Are you wanting to limit the number of records displayed per page and still know the total number of records found in the search?
DataDoIt
Posted: 02/25/2004, 5:36 PM

Yes.

<MichaelMikkelsen@forum.codecharge (Michael Mikkelsen)> wrote in message
news:5403d4492d0a2f@news.codecharge.com...
> Are you wanting to limit the number of records displayed per page and
still know the total number of records found in the search?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

DonB
Posted: 02/25/2004, 7:44 PM

Not really. You can set up a grid and limit it to a maximum number of
records, but I believe the query will still run to completion (fetch all
records) despite only dumping the requested max number of them to the client
browser. This is pretty much standard operating procedure for any database
driver/interface. Microsoft's ADO will let you set a "page size" (number of
rows), but I think it still fetches all the data, just does it
asynchronously so you don't wait on the query to complete.

I would just query for SELECT TOP 100 * FROM sometable (or whatever) to fill
the grid with the desired number of rows. Put a before show event in and
call CCDLookup() function to execute a SELECT COUNT(*) FROM sometable to get
the total count and stick it in a label.

--
DonB

http://www.gotodon.com/ccbth


"DataDoIt" <mike@datadoit.com> wrote in message
news:c1jiif$74k$1@news.codecharge.com...
> Yes.
>
> <MichaelMikkelsen@forum.codecharge (Michael Mikkelsen)> wrote in message
>news:5403d4492d0a2f@news.codecharge.com...
> > Are you wanting to limit the number of records displayed per page and
> still know the total number of records found in the search?
> > ---------------------------------------
> > Sent from YesSoftware forum
> > http://forums.codecharge.com/
> >
>
>

Rick

Posts: 52
Posted: 02/26/2004, 5:18 AM

If using MySQL see:
http://www.mysql.com/doc/en/SELECT.html
which shows the Select statements 'Limit' syntax:

[LIMIT [offset,] row_count | row_count OFFSET offset]

I have used it and if you are using MySQL you may be able to use it in is similar way to DobB's suggestion in his reply.

Rick
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.