index_cote; } $requete = "SELECT expl_cote as cote_expl from exemplaires where expl_cote like '".$res_dewey." %' "; $result = @mysql_query($requete, $dbh); $nbr_lignes = mysql_num_rows($result); // build the code using also the author name if ($nbr_lignes) { $max_value = 0; while($res = mysql_fetch_object($result)){ $cote_value = substr($res->cote_expl,strpos($res->cote_expl,' ')); if($max_value < $cote_value) $max_value = $cote_value; } $res_cote = $res_dewey." ".($max_value+1); } else { $res_cote = $res_dewey." 1"; } return $value_prefix_cote.$res_cote; } else return $cote ; } ?>