[PHP] PDO : pourquoi ça fonction pas ?
Bonjour,
Ca fait deux heures que je suis bloquer là dessus, je ne comprends pas pourquoi ça ne marche pas.
D'avance merci
Ca fait deux heures que je suis bloquer là dessus, je ne comprends pas pourquoi ça ne marche pas.
>?php
$connexion = new PDO('mysql:host='.HOST_MYSQL.';dbname='.BDD_MYSQL, USER_MYSQL, MDP_MYSQL);
$q=$connexion->prepare('SELECT * FROM mp WHERE lower(pseudo_dest) = ?');
$q->execute(array(strtolower($_SESSION['pseudo'])));
var_dump($q->fetch(PDO::FETCH_OBJ));
while($result=$q->fetch(PDO::FETCH_OBJ));
{
?>
<tr id="border">
<td class="expediteur"><?php echo $result->pseudo_exp ;?> <span class="new"></span></td>
<td class="sujet"><a href="index.php?page=mp&idm=<?php echo $result->id ; ?>"><?php echo $result->sujet ;?></a> </td>
<td class="date">le <?php echo date('d/m/Y', $result->date_envoi);?> à <?php echo date('H:i', $result->date_envoi) ;?> </td>
<td class="delete"><form action="index.php?page=voir_mp" method="post"><input class="button" type="submit" value="Supprimmer"/> <input class="button" type="hidden" value="<?php echo $result->id ; ?>" name="id"/></form></td>
</tr>
</tbody>
<?php
}
$result->closeCursor();
}
?>
D'avance merci