LassoScript Utility
Basics Browse Detail


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


-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.


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

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


No Parameters Required.


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]