Jump to content

Archived

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

nickk

Problem with DBX & MySQL

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?

Share this post


Link to post
Share on other sites

×

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.