1 2 3 4 5 6 7 8 9 10 11 12 13 14
| $sql = 'SELECT id,nom, email,date_insertion,titre,lect,date_reponse FROM forum WHERE id_reponse="0" ';
$sql.= ' ORDER BY date_reponse DESC, date_insertion DESC LIMIT '.mysql_escape_string($limit1).', ';
$sql.= mysql_escape_string($limit);
$res = mysql_query($sql) or die(showError('3', mysql_error()));
$nb = mysql_num_rows($res);
if($nb>0) {
while(list($id,$nom,$email,$dateheure,$titre,$lect,$dateajoute) = mysql_fetch_row($res)) {
$titre = substr($titre, 0, $carac);
$titre = stripslashes(stripslashes($titre));
$lect = substr($lect, 0, $carac);
$lect = stripslashes(stripslashes($lect)); |
Partager