Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
dde150eb
Commit
dde150eb
authored
Nov 01, 2010
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix titles
parent
022781cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
data-retrieval-and-manipulation.rst
reference/en/data-retrieval-and-manipulation.rst
+13
-12
schema-manager.rst
reference/en/schema-manager.rst
+5
-5
No files found.
reference/en/data-retrieval-and-manipulation.rst
View file @
dde150eb
...
...
@@ -6,7 +6,7 @@ your configured database for data retrieval and manipulation. Below
we'll introduce these methods and provide some examples for each of
them.
prepare(
$sql
)
prepare()
-------------
Prepare a given sql statement and return the
...
...
@@ -28,7 +28,7 @@ Prepare a given sql statement and return the
)
*/
executeUpdate(
$sql, array $params = array(), array $types = array()
)
executeUpdate()
--------------------------------------------------------------------
Executes a prepared statement with the given sql and parameters and
...
...
@@ -45,7 +45,7 @@ to perform necessary type conversions between actual input
parameters and expected database values. See the
`Types <./types#type-conversion>`_ section for more information.
executeQuery(
$sql, array $params = array(), array $types = array()
)
executeQuery()
-------------------------------------------------------------------
Creates a prepared statement for the given sql and passes the
...
...
@@ -69,7 +69,7 @@ to perform necessary type conversions between actual input
parameters and expected database values. See the
`Types <./types#type-conversion>`_ section for more information.
fetchAll(
$sql, array $params
)
fetchAll()
-----------------------------
Execute the query and fetch all results into an array:
...
...
@@ -88,7 +88,7 @@ Execute the query and fetch all results into an array:
)
*/
fetchArray(
$sql, array $params
)
fetchArray()
-------------------------------
Numeric index retrieval of first result row of the given query:
...
...
@@ -105,7 +105,7 @@ Numeric index retrieval of first result row of the given query:
)
*/
fetchColumn(
$sql, array $params, $colnum
)
fetchColumn()
-----------------------------------------
Retrieve only the given column of the first result row.
...
...
@@ -116,7 +116,7 @@ Retrieve only the given column of the first result row.
$username = $conn->fetchColumn('SELECT username FROM user WHERE id = ?', array(1), 0);
echo $username; // jwage
fetchAssoc(
$sql, array $params
)
fetchAssoc()
-------------------------------
Retrieve assoc row of the first result row.
...
...
@@ -134,7 +134,7 @@ Retrieve assoc row of the first result row.
There are also convenience methods for data manipulation queries:
delete(
$tableName, array $identifier
)
delete()
-------------------------------------
Delete all rows of a table matching the given identifier, where
...
...
@@ -146,7 +146,7 @@ keys are column names.
$conn->delete('user', array('id' => 1));
// DELETE FROM user WHERE id = ? (1)
insert(
$tableName, array $data
)
insert()
-------------------------------
Insert a row into the given table name using the key value pairs of
...
...
@@ -158,7 +158,7 @@ data.
$conn->insert('user', array('username' => 'jwage'));
// INSERT INTO user (username) VALUES (?) (jwage)
update(
$tableName, array $data, array $identifier
)
update()
--------------------------------------------------
Update all rows for the matching key value identifiers with the
...
...
@@ -177,7 +177,7 @@ lots of metadata available about the current context. When you use
the Doctrine DBAL as standalone, you have to take care of this
yourself. The following methods help you with it:
quote(
$input, $type = null
)
quote()
---------------------------
Quote a value:
...
...
@@ -186,8 +186,9 @@ Quote a value:
<?php
$quoted = $conn->quote('value');
$quoted = $conn->quote('1234', \PDO::PARAM_INT);
quoteIdentifier(
$identifier
)
quoteIdentifier()
----------------------------
Quote an identifier according to the platform details.
...
...
reference/en/schema-manager.rst
View file @
dde150eb
...
...
@@ -36,7 +36,7 @@ Retrieve an array of databases on the configured connection:
<?php
$databases = $sm->listDatabases();
listSequences(
$database = null
)
listSequences()
-------------------------------
Retrieve an array of ``Doctrine\DBAL\Schema\Sequence`` instances
...
...
@@ -63,7 +63,7 @@ Now you can loop over the array inspecting each sequence object:
echo $sequence->getName() . "\n";
}
listTableColumns(
$tableName
)
listTableColumns()
----------------------------
Retrieve an array of ``Doctrine\DBAL\Schema\Column`` instances that
...
...
@@ -83,7 +83,7 @@ Now you can loop over the array inspecting each column object:
echo $column->getName() . ': ' . $column->getType() . "\n";
}
listTableDetails(
$tableName
)
listTableDetails()
----------------------------
Retrieve a single ``Doctrine\DBAL\Schema\Table`` instance that
...
...
@@ -102,7 +102,7 @@ schema for that table. For example we can add a new column:
<?php
$table->addColumn('email_address', 'string');
listTableForeignKeys(
$tableName
)
listTableForeignKeys()
--------------------------------
Retrieve an array of ``Doctrine\DBAL\Schema\ForeignKeyConstraint``
...
...
@@ -123,7 +123,7 @@ object:
echo $foreignKey->getName() . ': ' . $foreignKey->getLocalTableName() ."\n";
}
listTableIndexes(
$tableName
)
listTableIndexes()
----------------------------
Retrieve an array of ``Doctrine\DBAL\Schema\Index`` instances that
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment