0
I’m trying to plot online but I’m having trouble in the
mysql_fetch_array() expects Parameter 1 to be Resource
This error appears to me, if you can help me to have a hint thank you. follows 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> ";
}
?>
Some people think Stackoverflow users have telepathic magical powers of clairvoyance. They believe that these superpowered Stackoverflownian beings can guess what the code is, the error message, and all the other necessary information is without needing to see anything about it and are still able to figure out what’s wrong with it all. Thus, these users believe that it is not necessary to place this information in the text of the question because it can be obtained by those who answer through supernatural and paranormal means.
– user60252
Welcome, some posts you should read to succeed in your questions https://answall.com/help/mcve. and more https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079
– user60252