Walle Posted September 9, 2010 Share Posted September 9, 2010 Hey, I'm trying to save a MySQL-Link source as an instance variable in my query class. The problem is that MySQL sees it as an invalid MySQL-Link (supplied argument is not a valid MySQL-Link resource). What I'm I doing wrong? //Walle private $connection; //Construct public function __construct(&$connection) { $this->connection = $connection; } //Where the error occurs public function exe_query($sql) { $result = mysql_query($sql, $this->connection); if(!$result) { throw new Exception(mysql_error()); } return $result; } Link to comment https://forums.phpfreaks.com/topic/212947-mysql-link-as-instance-variable/ Share on other sites More sharing options...
Walle Posted September 9, 2010 Author Share Posted September 9, 2010 Problem solved Link to comment https://forums.phpfreaks.com/topic/212947-mysql-link-as-instance-variable/#findComment-1109104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.