This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db['default']['hostname'] = "sqlserver"; | |
$db['default']['username'] = "sa"; | |
$db['default']['password'] = "Server123"; | |
$db['default']['database'] = "Asset_Mgr"; | |
$db['default']['dbdriver'] = "mssql"; | |
$db['default']['dbprefix'] = ""; | |
$db['default']['pconnect'] = TRUE; | |
$db['default']['db_debug'] = FALSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Home extends CI_Controller { | |
public function index() | |
{ | |
$this->db = $this->load->database('default', TRUE); | |
$sql = "select ITM_CD,ITM_NAME,PRICE from dbo.RETAIL_ITEM "; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "Mengakses SQL Server : "; | |
$serverName = "192.168.0.5\sql2008r2"; | |
$connectionOptions = array('Database'=>'RETAIL', 'UID'=>'sqluser', 'PWD'=>'12345'); | |
$conn = sqlsrv_connect( $serverName, $connectionOptions); | |
if( $conn === false ) | |
{ |