Jump to content

Dados não aparecem na tabela


alphasil

Recommended Posts

Olá ppl;

Depois de uns dias de descanso lá venho eu com outra dúvida ;)

<body>
<table>
        <tr style='background-color:#666666' align='center'>
        <th width="92" style="color:#FFF" align="center">Oferta</th>
          <th width="92" style="color:#FFF" align="center">Tipo</th>
	  <th width="122" style="color:#FFF" align="center">Concelho</th>
          <th width="89" style="color:#FFF" align="center">Freguesia</th>
	  <th width="98" style="color:#FFF" align="center">Rua</th>
	  <th width="111" style="color:#FFF" align="center">Códido Postal</th>
          <th width="111" style="color:#FFF" align="center">Descrição</th>
          <th width="111" style="color:#FFF" align="center">Valor</th>
         
        </tr>
        </table>
	<?php
$conexao = mysql_connect('localhost', 'root') or die ("Erro na conexao com DB!");
    mysql_select_db("jra", $conexao) or die ("DB inexistente");

$result=mysql_query("Select oferta, tipo, concelho, freguesia, rua, cp, descricao, valor From vendas");
while($row=mysql_fetch_row($result))	
{
	print "<tr>";
	print "<td align='center' style='background-color:#FDE5CF'>$row[0]</td>";
	print "<td align='center' style='background-color:#FDE5CF'>$row[1]</td>";
	print "<td align='center' style='background-color:#FDE5CF'>$row[2]</td>";
	print "<td align='center' style='background-color:#FDE5CF'>$row[3]</td>";
	print "<td align='center' style='background-color:#FDE5CF'>$row[4]</td>";
	print "<td align='center' style='background-color:#FDE5CF'>$row[5]</td>";
	print "<td align='center' style='background-color:#FDE5CF'>$row[6]</td>";
	print "<td align='center' style='background-color:#FDE5CF'>$row[7]</td>";
	print "</tr>";
}
?>
</font>	  
</body>

Os dados da query não me aparecem na tabela....porquê??


Obrigado

gmc11

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.