Topic: $this->
Hello... I wanto to ask you: what is this?
$this->
In the file mysql.php
function query($sql, $unbuffered = false)
{
if (defined('PUN_SHOW_QUERIES'))
$q_start = get_microtime();
if ($unbuffered)
$this->query_result = @mysql_unbuffered_query($sql, $this->link_id);
else
$this->query_result = @mysql_query($sql, $this->link_id);
if ($this->query_result)
{
if (defined('PUN_SHOW_QUERIES'))
$this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
++$this->num_queries;
return $this->query_result;
}
else
{
if (defined('PUN_SHOW_QUERIES'))
$this->saved_queries[] = array($sql, 0);
return false;
}
}
I am trying to make a page, but I have this error:
Notice: Undefined variable: this in c:\program files\easyphp1-8\www\prova_tabelle.php on line 64
And in that Line there is this php code:
60 function num_fields($query_id = 0)
61 {
62 global $db_type;
63 if (!$query_id)
64 $query_id = $this->query_result;
65 switch($db_type)
66 {
67 case 'mysql':
68 return ($query_id) ? @mysql_num_fields($query_id) : false;
69 break;
70 case 'mysqli':
71 return ($query_id) ? @mysqli_num_fields($query_id) : false;
72 }
73 }
Dante
[img]http://img517.imageshack.us/img517/1542/dante90bu4.jpg[/img]
[img]http://img522.imageshack.us/img522/5276/eurohackersuserbarnb4.gif[/img]