recent searches:
include functions ,
variable functions ,
post functions...
If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.
PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.
These functions allow you to access MS SQL Server database.
Requirements for Win32 platforms.
The extension requires the MS SQL Client Tools to be installed on the system where PHP is installed. The Client Tools can be installed from the MS SQL Server CD or by copying ntwdblib.dll from \winnt\system32 on the server to \winnt\system32 on the PHP box. Copying ntwdblib.dll will only provide access. Configuration of the client will require installation of all the tools.
Requirements for Unix/Linux platforms.
To use the MSSQL extension on Unix/Linux, you first need to build and install the FreeTDS library. Source code and installation instructions are available at the FreeTDS home page: http://www.freetds.org/
Note: In Windows, the DBLIB from Microsoft is used. Functions that return a column name are based on the dbcolname() function in DBLIB. DBLIB was developed for SQL Server 6.x where the max identifier length is 30. For this reason, the maximum column length is 30 characters. On platforms where FreeTDS is used (Linux), this is not a problem.
The MSSQL extension is enabled by adding extension=php_mssql.dll to php.ini.
To get these functions to work, you have to compile PHP with
--with-mssql[=DIR], where DIR is the
FreeTDS install prefix. And FreeTDS should be compiled using
--enable-msdblib.
The behaviour of these functions is affected by settings in php.ini.
Table 1. MS SQL Server configuration options
| Name | Default | Changeable | Changelog |
|---|---|---|---|
| mssql.allow_persistent | "1" | PHP_INI_SYSTEM | |
| mssql.max_persistent | "-1" | PHP_INI_SYSTEM | |
| mssql.max_links | "-1" | PHP_INI_SYSTEM | |
| mssql.min_error_severity | "10" | PHP_INI_ALL | |
| mssql.min_message_severity | "10" | PHP_INI_ALL | |
| mssql.compatability_mode | "0" | PHP_INI_ALL | |
| mssql.connect_timeout | "5" | PHP_INI_ALL | |
| mssql.timeout | "60" | PHP_INI_ALL | Available since PHP 4.1.0. |
| mssql.textsize | "-1" | PHP_INI_ALL | |
| mssql.textlimit | "-1" | PHP_INI_ALL | |
| mssql.batchsize | "0" | PHP_INI_ALL | Available since PHP 4.0.4. |
| mssql.datetimeconvert | "1" | PHP_INI_ALL | Available since PHP 4.2.0. |
| mssql.secure_connection | "0" | PHP_INI_SYSTEM | Available since PHP 4.3.0. |
| mssql.max_procs | "-1" | PHP_INI_ALL | Available since PHP 4.3.0. |
The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
Another Useful functions:
ref.mssql | function.mssql-select-db | function.mssql-rows-affected | function.mssql-result | function.mssql-query | function.mssql-pconnect | function.mssql-num-rows | function.mssql-num-fields | function.mssql-next-result | function.mssql-min-message-severity | function.mssql-min-error-severity | function.mssql-init | function.mssql-guid-string | function.mssql-get-last-message | function.mssql-free-statement | function.mssql-free-result | function.mssql-field-type | function.mssql-field-seek | function.mssql-field-name | function.mssql-field-length | function.mssql-fetch-row | function.mssql-fetch-object | function.mssql-fetch-field | function.mssql-fetch-batch | function.mssql-fetch-assoc | function.mssql-fetch-array | function.mssql-execute | function.mssql-data-seek | function.mssql-connect | function.mssql-close | function.mssql-bind |
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.