LassoScript Utility
Basics Browse Detail

-UseLimit

Tag Link -UseLimit Category Database
Type Command Source Available No
Support Preferred Version 6.0
Change Unchanged Data Source Lasso MySQL
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0

Description

-UseLimit prematurely ends a -Search or -FindAll action once the specified number of records for the -MaxRecords tag have been found and returns the found records. Requires the -MaxRecords tag. This issues an internal LIMIT statement to MySQL to cause it to search more efficiently.

Syntax

[Inline: -Search, -MaxRecords='25', -UseLimit, ...]

[Inline: -FindAll, -MaxRecords='25', -UseLimit, ...]

Parameters

No Parameters Required.

Examples

To have MySQL immediately return records once a limit is reached:

The following example searches the Contacts database with a limit of 10 records.

[Inline: -Findall, -Database='Contacts', -Table='People', -MaxRecords='10', -Uselimit]
[Found_Count]
[/Inline]

10