The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MSSQL and userspice
#4
Ok.. you've got a mysqli calls littered through at least step3. There is no way to create a MSSQL version of userspice using this. I did replace the connection code above and at least get a connection to the mssql db.
mysql connection:

<pre>
Code:
$dsn = "mysql:host=$dbh;dbname=$dbn;charset=utf8";
$opt = array(
    PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
);
$pdo = new PDO($dsn, $dbu, $dbp, $opt) or die('could not connect');
</pre>


mssql connection:

make $dbh in this form: 'hostname, 1433'

<pre>
Code:
$dsn = "sqlsrv:server=$dbh;Database = $dbn";
$dsn = "sqlsrv:server=$dbh;Database = $dbn";
$pdo = new PDO($dsn, $dbu, $dbp) or die('could not connect');
$pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$pdo->setAttribute( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC );
</pre>

  Reply


Messages In This Thread
MSSQL and userspice - by sqluser - 09-06-2016, 06:43 AM
RE: MSSQL and userspice - by ChalitaDK - 03-17-2019, 04:59 PM
MSSQL and userspice - by mudmin - 09-06-2016, 02:31 PM
MSSQL and userspice - by cmo - 09-15-2017, 01:09 PM
MSSQL and userspice - by cmo - 09-15-2017, 01:34 PM
MSSQL and userspice - by mudmin - 09-15-2017, 01:56 PM
MSSQL and userspice - by mudmin - 09-15-2017, 01:59 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)