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? Quote Link to comment https://forums.phpfreaks.com/topic/11268-problem-with-dbx-mysql/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.