Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Ola galera! Eu ja estou enlouquecendo com esse escript ele esta dando erro Warning: mysql_fetch_array(): supplied argument is not a valid MySQL, só porque eu mudei o nome da tabela
o mais imprecionante é que as duas tabala são iguais só muda o nome, e quando eu coloco o nome da tabela anteriao ele volta afuncionar e outro problema é que o include ="config"
parou de funcionar agora ele só funciona se eu colocar o conteuco da pagína config dentro do script como esta no codigo abaixo
<?php
$local_serve = "**********";
$usuario_serve = "***********";
$senha_serve = "********";
$banco_de_dados = "***********";
$conn = mysql_connect($local_serve, $usuario_serve, $senha_serve) or die ("O servidor não responde!");
$db = mysql_select_db($banco_de_dados,$conn)
or die ("Não foi possivel conectar-se ao banco de dados!");
$numreg = 5;
if (!isset($pg)) {
$pg = 0;
}
$inicial = $pg * $numreg;
$consulta = mysql_query("Select id, titulo, autor, texto, DATE_FORMAT(pdate, '%d/%m/%Y') as date From [b]AKI ESTA O PROBLEMA[/b] WHERE categoria='venda_de_veiculos' ORDER BY titulo")
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="[http://www.w3.org/1999/xhtml">](http://www.w3.org/1999/xhtml)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style3 {font-size: 16px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; font-weight: bold; }
-->
</style>
</head>
<body>
<table width="0" border="0" cellspacing="1" cellpadding="1">
<tr>
<th scope="col"> </th>
<th align="center" valign="middle" scope="col" ><p align="left" class="style3">Venda de Veículos</p> </th>
<th scope="col"> </th>
</tr>
<tr>
<td> </td>
<td>
<?php
include ('paginacao.php');
echo "<br>";
while ($linha = mysql_fetch_array($consulta)) {
$id = substr($linha['id'],0,150);
$titulo = substr($linha['titulo'],0,150);
$texto = substr($linha['texto'],0,150);
$autor = substr($linha['autor'],0,150);
$data = substr($linha['date'],0,150);
echo "<table width=150 height=200 border=1 cellspacing=1 cellpadding=1>";
echo "<tr><th scope=col height=30>$titulo</th></tr>";
echo "<tr><td>$texto</td></tr>";
echo "<tr><td height=30>$data</td></tr>";
echo "</table>";
echo "<br>";
echo "<br>";
}?>
<?php include ('paginacao.php'); ?>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
Alguem pode me ajudar?????? eu ja estou enlouquecendo.Carregando comentários...