Jump to content


Problem with DBX & MySQL

  • Please log in to reply
No replies to this topic

#1 nickk

  • Members
  • PipPip
  • Member
  • 15 posts

Posted 05 June 2006 - 07:37 PM

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:
class db
	var $module = DBX_MYSQL;
	var $server = "";
	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>");

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?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users