php - connection successful but 500 internal error while fetching data from sql server -
this config file. connecting localhost using port forwarding using bit-vise ssh client connection success while excuting query there 500 internal server.
<?php try { $hostname = "xx.xx.xx.xx"; $port = 2351; $dbname = "otomax"; $username = "sa"; $pw = "root"; $dbh = new pdo("sqlsrv:server=$hostname,$port;database=$dbname","$username","$pw"); "connect"; } catch (pdoexception $e) { "failed db handle:".$e->getmessage()."\n"; exit; } ?>
connection successful 500 internal error while fetching data server please me out
<?php include("config.php"); $id=$_session['kode']; $sql = "select * dbo.reseller kode='$id'"; $query = $db->prepare( $sql ); $query->execute(); $result = $query->fetchall( pdo::fetch_assoc ); ?>
please see code , me out
Comments
Post a Comment