config Use MS SQL SERVER 2005 2008.

You are viewing revision #4 of this wiki article.
This version may not be up to date with the latest version.
You may want to view the differences to the latest version.

next (#5) »

Use SQL SERVER 2000, the date format not like: yyyy/mm/dd hh:mm:ss. So I change to use SQL SERVER 2008 EXPRESS.

  1. download PDO MS EXT from: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=80e44913-24b4-4113-8807-caae6cf2ca05

  2. setup or release it.

  1. read the manual, copy .dll to PHP Ext Dir, and enable this EXT in php.ini.

    I recommend use: [php_pdo_sqlsrv_53_ts_vc6.dll] [php_sqlsrv_53_ts_vc6.dll]

  1. config your web main config. like this. If you use SQL SERVER 2005/2008 The 'connectionString' is not diff.
// PDO MSSQL
'db'=>array(
   // 'class'=>'application.components.MyMsSqlConnection', 

   // old PDO 
   //'connectionString' => 'mssql:host=HOSTNAME\SQLEXPRESS;dbname=Client',

   // new PDO
   'connectionString' => 'sqlsrv:Server=HOSTNAME\SQLEXPRESS;Database=Client',
      'username' => 'sa',
      'password' => '111',
      'charset' => 'GB2312',
      'tablePrefix' => 'tbl_',
),
		

I love YII

my site: www.WinPowerAssistant.com

3 0
8 followers
Viewed: 75 980 times
Version: Unknown (update)
Category: Tutorials
Written by: vcxz_1982
Last updated by: Asgaroth
Created on: May 11, 2011
Last updated: 12 years ago
Update Article

Revisions

View all history