本文整理汇总了PHP中parametres_perso::get_pond方法的典型用法代码示例。如果您正苦于以下问题:PHP parametres_perso::get_pond方法的具体用法?PHP parametres_perso::get_pond怎么用?PHP parametres_perso::get_pond使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parametres_perso
的用法示例。
在下文中一共展示了parametres_perso::get_pond方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: majNoticesMotsGlobalIndex
//.........这里部分代码省略.........
}
}
//Les champs perso
if (count($tab_pp)) {
foreach ($tab_pp as $code_champ => $table) {
$p_perso = new parametres_perso($table);
//on doit retrouver l'id des eléments...
switch ($table) {
case "expl":
$rqt = "select expl_id from notices join exemplaires on expl_notice = notice_id and expl_notice!=0 where notice_id = {$notice} union select expl_id from notices join bulletins on num_notice = notice_id join exemplaires on expl_bulletin = bulletin_id and expl_bulletin != 0 where notice_id = {$notice}";
$res = pmb_mysql_query($rqt);
if (pmb_mysql_num_rows($res)) {
$ids = array();
while ($row = pmb_mysql_fetch_object($res)) {
$ids[] = $row->expl_id;
}
}
break;
case "collstate":
break;
default:
$ids = array($notice);
}
if (count($ids)) {
for ($i = 0; $i < count($ids); $i++) {
$data = $p_perso->get_fields_recherche_mot_array($ids[$i]);
$j = 0;
$order_fields = 1;
foreach ($data as $code_ss_champ => $value) {
$tab_mots = array();
foreach ($value as $val) {
$tab_tmp = explode(' ', strip_empty_words($val));
//la table pour les recherche exacte
$tab_field_insert[] = "(" . $notice . "," . $code_champ . "," . $code_ss_champ . "," . $j . ",'" . addslashes(trim($val)) . "',''," . $p_perso->get_pond($code_ss_champ) . ",0)";
$j++;
foreach ($tab_tmp as $mot) {
if (trim($mot)) {
$tab_mots[$mot] = "";
}
}
}
$pos = 1;
foreach ($tab_mots as $mot => $langage) {
$num_word = 0;
//on cherche le mot dans la table de mot...
$query = "select id_word from words where word = '" . $mot . "' and lang = '" . $langage . "'";
$result = pmb_mysql_query($query);
if (pmb_mysql_num_rows($result)) {
$num_word = pmb_mysql_result($result, 0, 0);
} else {
$dmeta = new DoubleMetaPhone($mot);
$stemming = new stemming($mot);
$element_to_update = "";
if ($dmeta->primary || $dmeta->secondary) {
$element_to_update .= "\n\t\t\t\t\t\t\t\t\t\t\t\tdouble_metaphone = '" . $dmeta->primary . " " . $dmeta->secondary . "'";
}
if ($element_to_update) {
$element_to_update .= ",";
}
$element_to_update .= "stem = '" . $stemming->stem . "'";
$query = "insert into words set word = '" . $mot . "', lang = '" . $langage . "'" . ($element_to_update ? ", " . $element_to_update : "");
pmb_mysql_query($query);
$num_word = pmb_mysql_insert_id();
}
if ($num_word != 0) {
$tab_insert[] = "(" . $notice . "," . $code_champ . "," . $code_ss_champ . "," . $num_word . "," . $p_perso->get_pond($code_ss_champ) . ",{$order_fields},{$pos})";