Code: Select all
require_once('./mysql.php');
$db = new MySQL;
$db->connect(
localhost,
test_user,
test_pass,
test_db
);
$result = $db->query("SELECT * FROM test_table");
echo $db->num_rows($result);Code: Select all
$this->connect($host, $user, $pass, $db);Code: Select all
[B]Fatal error:[/B] Using $this when not in object context in I:\Apache\htdocs\test.php on line 5Code: Select all
require_once('./mysql.php');
$db = new MySQL;
$db->connect(
localhost,
test_user,
test_pass,
test_db
);Code: Select all
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in I:\Apache\htdocs\class\mysql.class.php on line 91
Error: 0: