index_cote; } $requete = "SELECT expl_cote as cote_expl from exemplaires where expl_cote like '".$res_dewey." %' "; $result = @pmb_mysql_query($requete, $dbh); $nbr_lignes = pmb_mysql_num_rows($result); // build the code using also the author name if ($nbr_lignes) { $max_value = 0; while($res = pmb_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 ; } ?>