PHP.mk документација

» Директно и подготвено извршување на изјави

Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.

ref.pdo-sqlsrv.connection.php PHP.net прокси Преводот се освежува
Оригинал на PHP.net
Патека ref.pdo-sqlsrv.connection.php Локална патека за оваа страница.
Извор php.net/manual/en Оригиналниот HTML се реупотребува и локално се стилизира.
Режим Прокси + превод во позадина Кодовите, табелите и белешките остануваат читливи во истиот тек.
» Директно и подготвено извршување на изјави

Референца за `ref.pdo-sqlsrv.connection.php` со подобрена типографија и навигација.

ref.pdo-sqlsrv.connection.php

» Директно и подготвено извршување на изјави

(PECL pdo_sqlsrv >= 2.0.1)

» Директно и подготвено извршување на изјавиConnecting to MS SQL Server and SQL Azure databases

= NULL

The PDO_SQLSRV Data Source Name (DSN) is composed of the following elements:

Името на изворот на податоци (DSN) на PDO_ODBC се состои од следниве елементи:

DSN префикс sqlsrv:.

APP
The application name used in tracing.
ConnectionPooling
Specifies whether the connection is assigned from a connection pool (1 or true) or not (0 or false).
Database
Името на базата на податоци.
Encrypt
Specifies whether the communication with SQL Server is encrypted (1 or true) or unencrypted (0 or false).
Failover_Partner
Specifies the server and instance of the database's mirror (if enabled and configured) to use when the primary server is unavailable.
LoginTimeout
Specifies the number of seconds to wait before failing the connection attempt.
MultipleActiveResultSets
Disables or explicitly enables support for multiple active Result sets (MARS).
QuotedId
Specifies whether to use SQL-92 rules for quoted identifiers (1 or true) or to use legacy Transact-SQL rules (0 or false).
Server
The name of the database server.
TraceFile
Specifies the path for the file used for trace data.
TraceOn
Specifies whether ODBC tracing is enabled (1 or true) or disabled (0 or false) for the connection being established.
TransactionIsolation
Specifies the transaction isolation level. The accepted values for this option are PDO::SQLSRV_TXN_READ_UNCOMMITTED, PDO::SQLSRV_TXN_READ_COMMITTED, PDO::SQLSRV_TXN_REPEATABLE_READ, PDO::SQLSRV_TXN_SNAPSHOT, and PDO::SQLSRV_TXN_SERIALIZABLE.
TrustServerCertificate
Specifies whether the client should trust (1 or true) or reject (0 or false) a self-signed server certificate.
WSID
Specifies the name of the computer for tracing.

Примери

Example #1 PDO_SQLSRV DSN examples

The following example shows how to connecto to a specified MS SQL Server database:

$c = new PDO("sqlsrv:Server=localhost;Database=testdb", "UserName", "Password");

The following example shows how to connect to a MS SQL Server database on a specified port:

$c = new PDO("sqlsrv:Server=localhost,1521;Database=testdb", "UserName", "Password");

The following example shows how to connecto to a SQL Azure database with server ID 12345abcde. Note that when you connect to SQL Azure with PDO, your username will be UserName@12345abcde (UserName@ServerId).

$c = new PDO("sqlsrv:Server=12345abcde.database.windows.net;Database=testdb", "UserName@12345abcde", "Password");

Белешки од корисници

Нема белешки од корисници за оваа страница.
Навигација

Прелистувај сродни теми и функции.

На оваа страница

Автоматски outline од активната документација.

Насловите ќе се појават тука по вчитување.

Попрегледно читање

Примерите, changelog табелите и user notes се визуелно издвоени за да не се губат во долгата содржина.

Брз совет Користи го outline-от Скокни директно на главните секции од активната страница.
Извор Оригиналниот линк останува достапен Кога ти треба целосен upstream context, отвори го PHP.net во нов tab.