fatal error message
Posted: Wed Apr 15, 2009 3:31 am
Hi guys, I have the following code
When I run the script I get the error message
Fatal error: Call to a member function on a non-object in /home/guntmar/public_html/intro.php on which is the line with the code
Does anyone of you have an idea what is wrong???
Code: Select all
<?php $db = mysql_connect("localhost", "username", "password");
if ( $db == "" ) { echo " DB Connection error...\r\n"; exit(); }
mysql_select_db("guntmar",$db); $Requete = "SELECT resultspo, resultsmo, resultspassion FROM `users`";
$result = mysql_query($Requete,$db);
while ($row = mysql_fetch_array($result))
{ $DataSet->AddPoint($row["resultspo"],"Serie1"); }
{ $DataSet->AddPoint($row["resultsmo"],"Serie2"); }
{ $DataSet->AddPoint($row["resultspassion"],"Serie3"); }
$DataSet->AddAllSeries();
$DataSet->SetSerieName("Passion Orientation","Serie1");
$DataSet->SetSerieName("Motivation","Serie2");
$DataSet->SetSerieName("Passion","Serie3");
?>Fatal error: Call to a member function on a non-object in /home/guntmar/public_html/intro.php on which is the line with the code
Code: Select all
{ $DataSet->AddPoint($row["resultspo"],"Serie1"); }