I'm trying to mount graphics online but I'm having trouble on
mysql_fetch_array () expects parameter 1 to be resource
This error appears to me, if you can help me get a thank you. follow code:
<?
include"conexao.php";
$seleciona_artigos = mysql_query("SELECT * FROM artigo order by artigo_visual desc " );
$seleciona_total_grafico = mysql_query("SELECT artigo_visual FROM artigo order by artigo_visual desc ");
$lin_total_grafico = mysql_fetch_array($seleciona_total_grafico);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Highcharts Example</title>
</head>
<body>
<?
while($lin_artigo = mysql_fetch_array($seleciona_artigos)){
$total_largura = ($lin_artigo ['artigo_visual']/$lin_total_grafico['artigo_visual'])*100;
echo"<div style='width:40px;background:#ccc;'>
<div style='background:#ccc;width:".$total_largura.";margin:5px 0;heigth:40px;display:table;line-heigth:30px;position:relative;'>
<div style='position:absolute;width:400px;padding:5px;'>".$lin_artigo['artigo_titulo']." - ".$lin_artigo['artigo_visual']." visiatas
<div style='display:table;float:right;padding:0 10px 0 0;'>".round($total_largura )."%</div>
</div>
</div> ";
}
?>