Londim 0 Denunciar post Postado Agosto 30, 2008 Tip qru uma tabela com 2 colunas qru buscar os dados no bd e escrevelas da sewguinte forma: 1 2 3 4 5 6 e assim por diante.... so q esse script ta assim 1 1 2 2 3 3 4 4 5 5 6 6 ve se vcs achan o prblema eu disiti... <table width="100%" border="0" cellspacing="0" cellpadding="0"> <? $exebau = mysql_query("select id, Festa, Local, Data, Flyer from fotos"); while($rrr = mysql_fetch_array($exebau)){ if($x==1) print"<th>"; else print"<tr><td> <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"1%\" rowspan=\"3\"><img name=\"\" src=\"programacao/cadastro/<? print $rrr[8]; ?>\" width=\"80\" height=\"60\"></td> <th width=\"99%\">:: <? print $rrr[1]; ?> :: </th> </tr> <tr> <td>Local: <? print $rrr[2]; ?></td> </tr> <tr> <td valign=\"top\">Data: <? print $rrr[3]; ?></td> </tr> </table>"; if($x==1){ print"</th>"; $x= 0;} else{ print"</td></tr>"; $x=1;} } ?> </table> vlw Compartilhar este post Link para o post Compartilhar em outros sites
Williams Duarte 431 Denunciar post Postado Agosto 30, 2008 Ve se resolve seu problema este script <?php $sql = mysql_query("SELECT * FROM tabela WHERE LIMIT 0,6 "); echo "<table width='100%' heigth='400px' border='0' cellspacing='8' cellpadding='8'>"; $conta_coluna = 1; while ($aux = mysql_fetch_array($sql)) { if ($conta_coluna == 1) { echo "<tr>"; } echo "<td align='center' bgcolor='#ffffff' width='33%\' >" . $aux["nome_produto"] . $aux["promo_de"] . "</td>"; $conta_coluna++; if ($conta_coluna == 3) { echo "</tr>"; $conta_coluna = 1; } } echo "</table>"; mysql_free_result($sql); ?> Abraços Compartilhar este post Link para o post Compartilhar em outros sites
Londim 0 Denunciar post Postado Agosto 31, 2008 Ve se resolve seu problema este script <?php $sql = mysql_query("SELECT * FROM tabela WHERE LIMIT 0,6 "); echo "<table width='100%' heigth='400px' border='0' cellspacing='8' cellpadding='8'>"; $conta_coluna = 1; while ($aux = mysql_fetch_array($sql)) { if ($conta_coluna == 1) { echo "<tr>"; } echo "<td align='center' bgcolor='#ffffff' width='33%\' >" . $aux["nome_produto"] . $aux["promo_de"] . "</td>"; $conta_coluna++; if ($conta_coluna == 3) { echo "</tr>"; $conta_coluna = 1; } } echo "</table>"; mysql_free_result($sql); ?> Abraços não cheguei a testar.....mas achei o defeito era o seguinte dentro da minha home coloquei dentro de um if um include de um script xamado galeria.php so q eu fiz outro galeria.php e qnd eu passsava o codigo ele busca o endereço do antigo ehehhehehehe Compartilhar este post Link para o post Compartilhar em outros sites