Jump to content

Problem with DBX & MySQL


nickk

Recommended Posts

I jsut started using DBX and am encountering a problem. In my script i make a new class for batabase functions, and within that class I have a connect function, it looks as follows:
[code=php:0]
class db
{
var $module = DBX_MYSQL;
var $server = "192.168.168.140";
var $username = "web";
var $password = "banga28leiden";
var $database = "comments";
var $dbconn;

function connect()
{
$this->dbconn = @dbx_connect($module, $server, $database, $username, $password)
or die("<b>Could not connect to database!</b>");
}
}
[/code]

when I call $db->connect() from my script, it doesnt work, but when I just use the dbx_connect function in my script (and not throught the db class) it works fine. Any suggestions?
Link to comment
https://forums.phpfreaks.com/topic/11268-problem-with-dbx-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.