ok, im working on a
vb free site and im setting up a code so that inorder to write/read a query i need to only type
now, here is what i hvae built so far!
PHP Code:
class Blizz { var $blizz; }
//set the function
$this->connection = $resource;
($resource = mysql_connect());
function query($query)
{
$resource = mysql_query($query, $this->connection);
if (!$resource)
{
$this->debug_query($query);
}
return $resource;
}
$db = new Blizz($dbhost, $dbuser, $dbpass, $dbname);
ok,
PHP Code:
$dbhost
$dbuser
$dbpass
$dbname
are all defined above... in the part of the sript that you can't handle!
why isent this working? ill give you my current error:
Quote:
Originally Posted by PHP 5.0.4
Fatal error: Using $this when not in object context in C:\apachefriends\xampp\htdocs\blizz\connect.php on line 35
|
i dont know if this matters, but line #35 is
Quote:
Originally Posted by Notepad ++
$this->connection = $resource;
|
anyways, i would ask AJ but, i feel like ive bugged him enough ^^;
Ty in advance
~Cody Woolaver