Será que possam me dar uma força , gostaria de determinar um numero que noticias que irão aparecer na pagina , exemplo 10 noticias e as demais aparecer nas paginas seguintes , em DESC ,
Nesta forma que estou usando esta aparecendo apenas as 20 ultimas noticias e na verdade preciso que elas fiquem paginadas , desde ja agradeço vcs todos , grato :
Cristian ,
Segue codigo :
<?
require_once('Connections/conecta.php');
?>
<?
mysql_select_db($database_conecta, $conecta);
$noticia = mysql_query("select * from noticia order by codigo desc limit 20");
while($row_noticia = mysql_fetch_assoc($noticia)){
?>
<link href="/interstyle.css" rel="stylesheet" type="text/css">
<div align="center"></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th scope="col"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCFFFF">
<tr>
<td width="74" class="style3" scope="col"><table width="99%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCFFFF">
<tr>
<th scope="col"><? if($row_noticia[foto]<>''){?>
<a href="noticia_inteira.php?cod=<? echo $row_noticia[codigo];?>"> <img src="<? echo $row_noticia[foto];?>" width="60" border="0"> </a>
<? }?></th>
</tr>
</table></td>
<td width="11" class="style3" scope="col"> </td>
<td width="933" class="style3" scope="col"><div align="center" class="menu">
<div align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><div align="left"><a href="noticia_inteira.php?cod=<? echo $row_noticia[codigo];?>" class="titulo3"><? echo $row_noticia['titulo'];?></a></div></th>
</tr>
</table>
</div>
</div></td>
</tr>
<tr bgcolor="EFF5F5">
<td colspan="3" class="style3" scope="col"><div align="center"><span class="style1"><? echo substr($row_noticia['texto'],0,100);?></span></div></td>
</tr>
</table></th>
</tr>
</table>
<? }?>
Edição feita por: inter7, 04/08/2005, 13:36.