You are here

function simplemeta_meta_load in Simple Meta 6.2

Same name and namespace in other branches
  1. 7 simplemeta.module \simplemeta_meta_load()

Load meta data

Parameters

string $sid Simplemeta data id:

Return value

mixed object representing metadata or FALSE on failure

2 calls to simplemeta_meta_load()
simplemeta_meta_delete in ./simplemeta.module
Delete meta
simplemeta_meta_form_validate_save in ./simplemeta.module

File

./simplemeta.module, line 218

Code

function simplemeta_meta_load($sid) {
  $query = "SELECT * FROM {simplemeta} WHERE sid = %d";
  if ($meta = db_fetch_object(db_query($query, $sid))) {
    $meta->data = unserialize($meta->data);
    return $meta;
  }
  return FALSE;
}