Hi.
I wanna migrate the code from PHP4 to PHP5, but It didn't work and threw the notice as follows:
Notice: Trying to get property of non-object in C:\xampp\htdocs\poll\miniPoll.class.php on line 47
Notice: Trying to get property of non-object in C:\xampp\htdocs\poll\miniPoll.class.php on line 48
the code snippets include line 48,47 in the miniPoll.class.php :
44 function getActivePoll() {
45 $sql = @mysql_query ("SELECT pollid, polltitle FROM poll_desc WHERE status = 'active'");
46 $row = @mysql_fetch_object($sql);
47 $this->active_poll_id = $row->pollid;
48 $this->active_poll_title = $row->polltitle;
49 return;
50 }
Is there anybody able to guide me on this, thank you!