phpreports icon indicating copy to clipboard operation
phpreports copied to clipboard

MySQL reports not working

Open dfliess opened this issue 5 years ago • 1 comments

When selecting a database you need the link on mysqli

https://github.com/taq/phpreports/blob/f81e4bdbc55c534f72d703c739e936f50bc0abdb/database/db_mysql.php#L16

I made the following change on the file,

function db_connect($oArray) {
			$oCon = mysqli_connect($oArray[2], $oArray[0], $oArray[1]);
			if(!$oCon)
				die("could not connect");
			if(!is_null($oArray[3]))
				PHPReportsDBI::db_select_db($oCon,$oArray[3]);
			return $oCon;
		}

		function db_select_db($oCon,$sDatabase) {
			mysqli_select_db($oCon,$sDatabase);
		}

Maybe on mssql is the same but:

		function db_select_db($oCon,$sDatabase) {
			mssql_select_db($sDatabase,$oCon);  //Notice Different order than mysqli
		}

not sure on SQLLite.

dfliess avatar Jan 02 '20 23:01 dfliess

Ouch, a long time i don't use MySQL or event phpReports! :-) Will try to take a look on this.

taq avatar Jan 03 '20 20:01 taq