Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Return events from all businesses owned by a user.
- * Note: Returns generic objects like fetch_orig().
- */
- public function events () {
- $businesses = self::query ()->where ('owner', $this->id)->fetch_field ('id');
- $qmarks = array_fill (0, count ($businesses), '?');
- return DB::fetch (
- 'select * from #prefix#myapp_event where id in(' . join(',', $qmarks) . ')',
- $businesses
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement