Doctrine
Projects
Coding Standard
Collections
Common
Data fixtures
DBAL
Event Manager
Inflector
Instantiator
Lexer
Migrations
MongoDB ODM
ORM
Persistence
PHPCR ODM
RST Parser
Skeleton Mapper
View All
Development
Community
Contributor Workflow
Maintainer Workflow
Contribute to Website
Policies
GitHub
Styleguide
Partners
Blog
Edit
Reference
Introduction
Architecture
Drivers
Middlewares
Platforms
Logging
Schema
Types
Configuration
Getting a Connection
Connecting using a URL
Driver
Wrapper Class
Connection Details
Automatic platform version detection
Custom Driver Options
Data Retrieval And Manipulation
Data Retrieval
Dynamic Parameters and Prepared Statements
Using Prepared Statements
Binding Types
DoctrineDBALTypes Conversion
List of Parameters Conversion
API
prepare()
executeStatement()
executeQuery()
fetchAllAssociative()
fetchAllKeyValue()
fetchAllAssociativeIndexed()
fetchNumeric()
fetchOne()
fetchAssociative()
iterateKeyValue()
iterateAssociativeIndexed()
delete()
insert()
update()
SQL Query Builder
Security: Safely preventing SQL Injection
Building a Query
DISTINCT-Clause
WHERE-Clause
Table alias
GROUP BY and HAVING Clause
Join Clauses
Order-By Clause
Limit Clause
VALUES Clause
Set Clause
Building Expressions
Binding Parameters to Placeholders
Caching
Transactions
Transaction Nesting
Dummy mode
Emulated Transaction Nesting with Savepoints
Auto-commit mode
Error handling
Platforms
MySQL
MariaDB
Oracle
Microsoft SQL Server
PostgreSQL
IBM DB2
SQLite
Types
Reference
Numeric types
String types
Bit types
Date and time types
Array types
Object types
Mapping Matrix
Detection of Database Types
Custom Mapping Types
Schema-Manager
listDatabases()
listSequences()
listTableColumns()
introspectTable()
listTableForeignKeys()
listTableIndexes()
listTables()
listViews()
introspectSchema()
Overriding the schema manager
Schema-Representation
Schema Assets
Table
Column
Security
SQL Injection: Safe and Unsafe APIs for User Input
User input in your queries
Wrong: String Concatenation
Right: Prepared Statements
Discouraged: Quoting/Escaping values
Supporting Other Databases
Implementation Steps in Detail
Portability
Connection Wrapper
Database Platform
Keyword Lists
Caching
Configuring the result cache
Providing a cache profile
Known Vendor Issues
PostgreSQL
DateTime, DateTimeTz and Time Types
Timezones and DateTimeTz
MySQL
DateTimeTz
Sqlite
Buffered Queries and Isolation
DateTime
DateTimeTz
Reverse engineering primary key order
IBM DB2
DateTimeTz
Oracle
DateTimeTz
OCI-LOB instances
Microsoft SQL Server
Unique and NULL
DateTime, DateTimeTz and Time Types
Testing Guidelines
Requirements
Types of Tests
Unit Tests
Integration Tests
Recommendations on Writing Tests
Explanation
Doctrine SQL comments
Implicit indexes
Projects
DBAL
Documentation
You are browsing a version that is no longer maintained.
Table of Contents
3.7.3
Maintained
5.0 (upcoming)
4.1 (upcoming)
4.0.1 (current)
3.9 (upcoming)
3.8.3
Unmaintained
3.7
3.6
3.5
3.4
3.3
3.2
3.1
3.0
2.13
2.12
2.11
2.10
2.9
2.8
2.7
2.6
2.5
2.4
Reference
Introduction
Architecture
Drivers
Middlewares
Platforms
Logging
Schema
Types
Configuration
Getting a Connection
Connecting using a URL
Driver
Wrapper Class
Connection Details
Automatic platform version detection
Custom Driver Options
Data Retrieval And Manipulation
Data Retrieval
Dynamic Parameters and Prepared Statements
Using Prepared Statements
Binding Types
DoctrineDBALTypes Conversion
List of Parameters Conversion
API
prepare()
executeStatement()
executeQuery()
fetchAllAssociative()
fetchAllKeyValue()
fetchAllAssociativeIndexed()
fetchNumeric()
fetchOne()
fetchAssociative()
iterateKeyValue()
iterateAssociativeIndexed()
delete()
insert()
update()
SQL Query Builder
Security: Safely preventing SQL Injection
Building a Query
DISTINCT-Clause
WHERE-Clause
Table alias
GROUP BY and HAVING Clause
Join Clauses
Order-By Clause
Limit Clause
VALUES Clause
Set Clause
Building Expressions
Binding Parameters to Placeholders
Caching
Transactions
Transaction Nesting
Dummy mode
Emulated Transaction Nesting with Savepoints
Auto-commit mode
Error handling
Platforms
MySQL
MariaDB
Oracle
Microsoft SQL Server
PostgreSQL
IBM DB2
SQLite
Types
Reference
Numeric types
String types
Bit types
Date and time types
Array types
Object types
Mapping Matrix
Detection of Database Types
Custom Mapping Types
Schema-Manager
listDatabases()
listSequences()
listTableColumns()
introspectTable()
listTableForeignKeys()
listTableIndexes()
listTables()
listViews()
introspectSchema()
Overriding the schema manager
Schema-Representation
Schema Assets
Table
Column
Security
SQL Injection: Safe and Unsafe APIs for User Input
User input in your queries
Wrong: String Concatenation
Right: Prepared Statements
Discouraged: Quoting/Escaping values
Supporting Other Databases
Implementation Steps in Detail
Portability
Connection Wrapper
Database Platform
Keyword Lists
Caching
Configuring the result cache
Providing a cache profile
Known Vendor Issues
PostgreSQL
DateTime, DateTimeTz and Time Types
Timezones and DateTimeTz
MySQL
DateTimeTz
Sqlite
Buffered Queries and Isolation
DateTime
DateTimeTz
Reverse engineering primary key order
IBM DB2
DateTimeTz
Oracle
DateTimeTz
OCI-LOB instances
Microsoft SQL Server
Unique and NULL
DateTime, DateTimeTz and Time Types
Testing Guidelines
Requirements
Types of Tests
Unit Tests
Integration Tests
Recommendations on Writing Tests
Explanation
Doctrine SQL comments
Implicit indexes
Top