je rencontre un problème pour récupérer un champ de ma BDD.
Ce champ s'appel place_pour_match
J'ai une requète SQL qui fonctionne bien car j'ai plusieurs autres champs qui sont récupéré sans aucun problème.
Voici les champ contenues dans ma table
Seul le champ place_pour_match n'est pas récupéré
Pourtant voici un morceau de ma page qui attribue les valeurs qu'il faut dans le tpl
Code : Tout sélectionner
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'impossible de consulter la table match', '', __LINE__, __FILE__, $sql);
}
$row_match = $db->sql_fetchrowset($result);
$count_match = $db->sql_numrows($result);
$sql = "SELECT *
FROM ". MATCH_CONFIG_TABLE ;
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'impossible de consulter la table match_config', '', __LINE__, __FILE__, $sql);
}
$row_config = $db->sql_fetchrow($result);
if ($row_config['match_value'] == '0')
{
$template->set_filenames(array(
'Mod_match' => 'match.tpl',
));
for($nb_actuel = 0; $nb_actuel < $count_match; $nb_actuel++)
{
if ($row_match[$nb_actuel]['participants'] == '')
{
$participants[$nb_actuel] = $lang['no_player'];
}
else
{
$participants[$nb_actuel] = htmlspecialchars ($row_match[$nb_actuel]['participants']);
}
$id_match = htmlspecialchars ($row_match[$nb_actuel]['id_match']);
$t_place_pour_match = htmlspecialchars ($row_match[$nb_actuel]['place_pour_match']);
$html_code_haut = $row_match[$nb_actuel]['htmlcodehaut'];
$html_code_bas = $row_match[$nb_actuel]['htmlcodebas'];
$t_contre = htmlspecialchars ($row_match[$nb_actuel]['adversaire']);
$t_date_jour = htmlspecialchars ($row_match[$nb_actuel]['date_jour']);
$t_date_mois = htmlspecialchars ($row_match[$nb_actuel]['date_mois']);
$t_date_annee = htmlspecialchars ($row_match[$nb_actuel]['date_annee']);
$t_heure_heure = htmlspecialchars ($row_match[$nb_actuel]['heure']);
$t_heure_minute = htmlspecialchars ($row_match[$nb_actuel]['minute']);
$t_type = htmlspecialchars ($row_match[$nb_actuel]['type']);
$t_type2 = htmlspecialchars ($row_match[$nb_actuel]['type2']);
$t_mode = htmlspecialchars ($row_match[$nb_actuel]['mode']);
$t_restriction = htmlspecialchars ($row_match[$nb_actuel]['restriction']);
$t_leur_camp = htmlspecialchars ($row_match[$nb_actuel]['leur_camp']);
$t_notre_camp = htmlspecialchars ($row_match[$nb_actuel]['notre_camp']);
$t_leur_map = htmlspecialchars ($row_match[$nb_actuel]['leur_map']);
$t_notre_map = htmlspecialchars ($row_match[$nb_actuel]['notre_map']);
$t_commentaires = htmlspecialchars ($row_match[$nb_actuel]['commentaires']);
$t_participants = htmlspecialchars ($participants[$nb_actuel]);
$template->assign_vars(array(
'T_PLACE_POUR_MATCH' => $t_place_pour_match,
'HTMLCODEHAUT' => $html_code_haut,
'HTMLCODEBAS' => $html_code_bas,
'CONTRE' => $lang['Contre'],
'DATE' => $lang['Date'],
'HEURE' => $lang['Heure'],
'TYPE' => $lang['Type'],
'MODE' => $lang['Mode'],
'RESTRICTION' => $lang['Restriction'],
'LEUR_CAMP' => $lang['Leur_Camp'],
'NOTRE_CAMP' => $lang['Notre_Camp'],
'LEUR_MAP' => $lang['Leur_MAP'],
'NOTRE_MAP' => $lang['Notre_MAP'],
'COMMENTAIRES_ET_PARTICIPANT' => $lang['Commentaires_participants'],
'T_NOTRE_MAP' => $t_notre_map,
'T_CONTRE' => $t_contre,
'T_DATE_JOUR' => $t_date_jour,
'T_DATE_MOIS' => $t_date_mois,
'T_DATE_ANNEE' => $t_date_annee,
'T_HEURE_HEURE' => $t_heure_heure,
'T_HEURE_MINUTE' => $t_heure_minute,
'T_TYPE' => $t_type,
'T_TYPE2' => $t_type2,
'T_MODE' => $t_mode,
'T_RESTRICTION' => $t_restriction,
'T_LEUR_CAMP' => $t_leur_map,
'T_NOTRE_CAMP' => $t_notre_camp,
'T_LEUR_MAP' => $t_leur_map,
'T_COMMENTAIRES' => ( $board_config['allow_smilies'] ) ? smilies_pass($row_match[$nb_actuel]['commentaires']) : $row_match[$nb_actuel]['commentaires'],
'ID_MATCH' => $id_match,
'T_PARTICIPANTS' => $t_participants,
'L_SUBMIT_PSEUDO' => $lang['Submit_pseudo'],
'L_PLUS_PSEUDO' => $lang['Plus_pseudo'],
'L_ID_MATCH' => $lang['id_du_match'],
'L_PLACE_MATCH' => $lang['L_Place_match'],
"S_PSEUDO_ACTION" => append_sid("index.$phpEx"),
)
);
$template->pparse('Mod_match');
}
}
Code : Tout sélectionner
{HTMLCODEHAUT}
<form action="{S_PSEUDO_ACTION}" method="post"><table width="100%" border="0" cellspacing="1" cellpadding="1" align="center" class="forumline">
<tr>
<th><div align="center">{CONTRE}</td></div>
<th><div align="center">{DATE}</td></div>
<th><div align="center">{HEURE}</div></td>
<th><div align="center">{TYPE}</div></td>
<th><div align="center">{MODE}</div></td>
<th><div align="center">{RESTRICTION}</div></td>
<th><div align="center">{LEUR_CAMP}</div></td>
<th><div align="center">{NOTRE_CAMP}</div></td>
<th><div align="center">{LEUR_MAP}</div></td>
<th><div align="center">{NOTRE_MAP}</div></td>
</tr>
<tr>
<td class="row2"><div align="center" class="gen">{T_CONTRE}</div></td>
<td class="row2"><div align="center" class="gen">{T_DATE_JOUR}/{T_DATE_MOIS}/{T_DATE_ANNEE}</div></td>
<td class="row2"><div align="center" class="gen">{T_HEURE_HEURE}H{T_HEURE_MINUTE}</div></td>
<td class="row2"><div align="center" class="gen">{T_TYPE} VS {T_TYPE2}</div></td>
<td class="row2"><div align="center" class="gen">{T_MODE}</div></td>
<td class="row2"><div align="center" class="gen">{T_RESTRICTION}</div></td>
<td class="row2"><div align="center" class="gen">{T_LEUR_CAMP}</div></td>
<td class="row2"><div align="center" class="gen">{T_NOTRE_CAMP}</div></td>
<td class="row2"><div align="center" class="gen">{T_LEUR_MAP}</div></td>
<td class="row2"><div align="center" class="gen">{T_NOTRE_MAP}</div></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1" align="center" class="forumline">
<tr>
<th><div align="center">{L_ID_MATCH}</div></td>
<th><div align="center">{L_PLACE_MATCH}</div></td>
</tr>
<tr>
<td class="row2" align="center"><input style="text-align:center;" name="id_match" type="text" class="post" value="{ID_MATCH}" size="3" maxlength="10" readonly></td>
<td class="row2" align="center"><input style="text-align:center;" name="place_pour_match" type="text" class="post" value="{T_PLACE_POUR_MATCH}" size="3" maxlength="10" readonly></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1" align="center" class="forumline">
<tr>
<th width="100%"><div align="center">{COMMENTAIRES_ET_PARTICIPANT}</div></td>
</tr>
<tr>
<td class="row2" width="100%"><div align="center" class="gen">{T_COMMENTAIRES}</div></td>
</tr>
<tr>
<td class="row2" align="center"><input style="text-align:center;" name="participant" type="text" class="post" value="{T_PARTICIPANTS}" size="150" maxlength="200" readonly></td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center"><input type="submit" name="present" value="{L_SUBMIT_PSEUDO}" class="mainoption" /> <input type="submit" name="plus_present" value="{L_PLUS_PSEUDO}" class="mainoption" /></td>
</tr>
</table>
{S_HIDDEN_FIELDS}</form>
{HTMLCODEBAS}
<br/>
J'aurais dépassé la mémoire possible pour stocker dans des variables ?
Si c'est le cas comment faire ?
pourtant quand j'enlève des variables sa passe toutjours pas
Merci @ toutes personnes pouvant m'aider