You are here

function _favorites_load_favorite_db in Favorites 7.2

Same name and namespace in other branches
  1. 7 favorites.module \_favorites_load_favorite_db()

Helper function: Load a single favorite from the DB.

Used to abstract the storage model (cookie vs. db).

Parameters

$fid: The favorite's DB ID.

Return value

object|bool The favorite, if found in the DB. Otherwise FALSE.

See also

favorite_load().

1 call to _favorites_load_favorite_db()
favorite_load in ./favorites.module
Helper function to load a favorite.

File

./favorites.module, line 585
The favorites module allows users to bookmark any path within a site.

Code

function _favorites_load_favorite_db($fid) {
  return db_select('favorites', 'f')
    ->fields('f')
    ->condition('fid', $fid, '=')
    ->execute()
    ->fetchObject();
}