nickk Posted June 5, 2006 Share Posted June 5, 2006 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.