function _DatabaseHandler::get_group_id

4.x _DatabaseHandler.php _DatabaseHandler::get_group_id($group_name, $catalog_year)
5.x _DatabaseHandler.php _DatabaseHandler::get_group_id($group_name, $catalog_year)

File

classes/_DatabaseHandler.php, line 799

Class

_DatabaseHandler

Code

function get_group_id($group_name, $catalog_year) 
 {

  if ($catalog_year < $GLOBALS ["fp_system_settings"]["earliest_catalog_year"]) 
   {
    $catalog_year = $GLOBALS ["fp_system_settings"]["earliest_catalog_year"];
  }

  $res7 = $this->db_query("SELECT * FROM groups
							WHERE `group_name`='?'
							AND `catalog_year`='?'
							 LIMIT 1 ", $group_name, $catalog_year);
  if ($this->db_num_rows($res7) > 0) 
   {
    $cur7 = $this->db_fetch_array($res7);
    return $cur7 ["group_id"];
  }
  return false;
}