gabordemooij/redbean — Issue #95: Feature Request, R::any or R::exists
Author: nvrnight
Created: 2011-10-21 16:18:06+00:00
State: open

I didn't see a feature for this anywhere, if there is one already I apologize in advance for this ticket and would like to know what it is. :)

A function to check if a bean exists in the database rather than having to do an rcount on a collection.

Example: R::any('book', 'id = ?', array(5))

Return true if there's a book bean with an id of 5, false if not

Great work as always, much appreciated