D7 API documentation
What's New
Modules
Main module in old core
Connection constructor
add
clearCaches
commitTransaction
connect
createIndex
createPrimaryIndex
disableQueryExecuting
disconnect
dropColumn
dropTable
enableQueryExecuting
executeSqlBatch
getAffectedRowsCount
getDbHost
getDbLogin
getDbName
getDisabledQueryExecutingDump
getIndexName
getNodeId
getSqlHelper
getTableField
getTableFields
getTracker
getType
getVersion
isIndexExists
isTableExists
query
queryExecute
queryScalar
renameTable
rollbackTransaction
setConnectionResourceNoDemand
setNodeId
setTracker
startTracker
startTransaction
stopTracker
truncateTable
add
integer public \Bitrix\Main[/link]\DB\Connection::add( string $tableName, array $data, string $identity = "ID" );
This non-static method adds row to table and returns ID of the added row.
$identity
parameter must be null when table does not have autoincrement columns.
Parameters
Parameter | Description | Version |
---|---|---|
$tableName | Name of table for inserting new row. | |
$data | Array of columnName => Value pairs. | |
$identity | For Oracle only. |
Exception
Examples
© «Bitrix24», 2001-2024
Up