MySQL Forums
Forum List  »  MySQL Administrator

Restricting number of records in a single query
Posted by: Ravi Tanra
Date: March 28, 2011 11:01AM

We have a central database accessed by a few database users from remote hosts. In any circumstances, a user does not need to access more than one record at a time in a single 'select' query. Hence for security reasons, we would like to impose limit on number of records a user can fetch from remote hosts in a single query.

For example, if we like to limit max 5 records in a single query, and user issues a query:

select * from vendors; // Should fetch maximum 5 records.
select * from vendors limit 2; // Should fetch maximum 2 records.
select * from vendors limit 10; // Should fetch maximum 5 records.


How can I achieve this?

thanks



Edited 2 time(s). Last edit at 03/28/2011 11:05AM by Ravi Tanra.

Options: ReplyQuote


Subject
Written By
Posted
Restricting number of records in a single query
March 28, 2011 11:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.