How to use a SQL Server database with your PHP web site
Today's featured TechNet Wiki article can be found here. It was originally authored by Larry Franks.
===============
Intended audience: Web developers who are not familiar with SQL Server, yet want to learn how to use a SQL Server database with their PHP web sites.
The links below are external links and provide information and guidance on creating dynamic web pages using PHP, SQL Server and IIS as part of web site development. This information assumes that you are already familiar with PHP development. If you are not familiar with PHP and are looking for information or additional programming resources for this language, visit https://www.php.net/.
Setting up your environment
- Getting Started with PHP on Windows (initial setup, including manual setup)
- Getting Started with PHP on Windows with SQL Server Express (initial setup and basic usage)
- Getting Started with the SQL Server Driver for PHP
- SQL Server Driver for PHP: Understanding Windows Authentication
Connecting to SQL Server from PHP
- Connecting to the SQL Server
- How to: Connect Using Windows Authentication
- How to: Connect Using SQL Server Authentication
Storing and Retrieving Data
- Execute a query using sqlsrv_query
- Execute a prepared statement using sqlsrv_execute
- How to: Perform Parameterized Queries
- How to: Perform Transactions
- Retrieving data
- Retrieve data as an array
- Retrieve data as a PHP object
- Retrieve a row of data
- Retrieve a field from the current row
- Storing images/using FILESTREAM
PHP Data Object (PDO) Support
- Retrieving a row of data
- Retrieve all rows as an array
- Retrieve one column from a row
- Retrieve a row as a PHP object
Other Languages
This article is also available in the following languages:
- Portuguese: Como Utilizar PHP do SQL Server (pt-BR)
- Japanese: PHP で SQL Server を利用するには (ja-JP)
- Spanish: Cómo usar PHP con SQL Server (es-ES)
=======================
Read the latest version of this Wiki article here, including lists of articles about Improving Performance and Security Concerns.
Comments
- Anonymous
January 31, 2016
Computers Today (part 1 of 6) blogs.msdn.com/.../computers-today.aspx ..... CS SPOTLIGHT: Girls in computer programming... why it matters!!! blogs.msdn.com/.../cs-spotlight-girls-in-computer-programming-why-it-matters.aspx ... Computational Thinking - Videos & Papers by Jeannette Wing blogs.msdn.com/.../computational-thinking-videos-amp-papers-by-jeannette-wing.aspx