mauricio Posted October 2, 2004 Report Share Posted October 2, 2004 while ($row = mysql_fetch_assoc($result)){ $id = $row['id']; $texto = $row['texto']; $nome = $row['nome']; $titulo = $row['titulo']; echo "$id"; echo " - "; echo "$titulo"; echo "<br>"; echo " - "; echo "$texto"; echo "<br>"; echo " - "; echo "$nome"; echo "<br>";}vejam o errohttp://www.atxclan.com/query/paginacao.phpaparece %titulo :\ Quote Link to comment Share on other sites More sharing options...
0 Gladisson Posted October 2, 2004 Report Share Posted October 2, 2004 Verifique como está o campo pelo phpmyadmin! Quote Link to comment Share on other sites More sharing options...
0 mauricio Posted October 2, 2004 Author Report Share Posted October 2, 2004 Structure Browse SQL Search Insert Export Operations Empty Drop Field Type Attributes Null Default Extra Action id int(30) No auto_increment titulo longtext No nome longtext No texto longtext No Check All / Uncheck All With selected: Quote Link to comment Share on other sites More sharing options...
0 chackal_sjc Posted October 2, 2004 Report Share Posted October 2, 2004 qualquer você escreveu no $result ?e tenta usar o mysql_fetch_array Quote Link to comment Share on other sites More sharing options...
0 mauricio Posted October 2, 2004 Author Report Share Posted October 2, 2004 <html><head><title>Paginação</title><style type="text/css">body { font-family: Verdana; font-size: 12px; }a { font-family: Verdana; font-size: 12px; color: #000000; text-decoration: none; }a:hover { color: #FE5400; text-decoration: none; }</style></head><body><?include("config.php");$link_p_pag = 5;$reg_p_pag = 30;$pag = $_GET['pag'];$busca = mysql_query("SELECT count(*) FROM paginacao;");$registros = mysql_result($busca,0); echo "<font face=verdana size=1>";echo "Número de registros: ";echo "<b>$registros</b>";echo "<br>";$num_total_paginas = ($registros%$reg_p_pag==0)?$registros/$reg_p_pag:floor($registros/$reg_p_pag)+1;echo "Número de páginas: ";echo "<b>$num_total_paginas</b>";echo "<br>";echo "Registros por páginas: ";echo "<b>$reg_p_pag</b>";echo "<br><br>";if ($pag>$num_total_paginas)echo "Error<br><br>";elseif (!$pag)$pag = 1;$inicio = ($reg_p_pag*$pag)-$reg_p_pag;$query = "SELECT * FROM paginacao ORDER BY id DESC LIMIT $inicio, $reg_p_pag";$result = @mysql_query($query);while ($row = mysql_fetch_assoc($result)){ $id = $row['id]; $texto = $row['texto']; $nome = $row['nome']; $titulo = $row['titulo']; echo $id; echo " - "; echo $titulo; echo "<br>"; echo " - "; echo $texto; echo "<br>"; echo " - "; echo $nome; echo "<br>";}echo "<font face=verdana size=1><br>";$anterior = $pag-1;if ($anterior<1)echo "<font face=verdana size=1>« Anterior - ";elseecho "« <a href=\"{$_SERVER['PHP_SELF']}?pag=$anterior\"><font face=verdana size=1>Anterior</a> - ";for($i=1; $i<$pag; $i++)if($i>=$pag-$link_p_pag)echo "<a href=\"{$_SERVER['PHP_SELF']}?pag=$i\"><font face=verdana size=1>$i</a> - ";echo "<font face=verdana size=1><b>[ $pag ]</b>";for($i=$pag+1; $i<=$num_total_paginas; $i++)if($i<=$pag+$link_p_pag)echo " - <a href=\"{$_SERVER['PHP_SELF']}?pag=$i\"><font face=verdana size=1>$i</a>";$proxima = $pag+1;if ($proxima>$num_total_paginas)echo "<font face=verdana size=1> - Próxima »";elseecho " - <a href=\"{$_SERVER['PHP_SELF']}?pag=$proxima\"><font face=verdana size=1>Próxima</a> »";?></body></html> Quote Link to comment Share on other sites More sharing options...
0 mauricio Posted October 3, 2004 Author Report Share Posted October 3, 2004 alguém me ajuda please Quote Link to comment Share on other sites More sharing options...
0 rEd nEcK * Posted October 3, 2004 Report Share Posted October 3, 2004 ve se o erro não é na hora de inserir na dbfalou Quote Link to comment Share on other sites More sharing options...
0 Illidan Posted October 3, 2004 Report Share Posted October 3, 2004 Cara, como que estão esses registros no banco de dados? Quote Link to comment Share on other sites More sharing options...
0 Gladisson Posted October 4, 2004 Report Share Posted October 4, 2004 Pois é... verifique clicando em "Browse" phpmyadmin. Quote Link to comment Share on other sites More sharing options...
Question
mauricio
vejam o erro
http://www.atxclan.com/query/paginacao.php
aparece %titulo :\
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.