Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Fetch a key from an array
<?php key(array|object $array): int|string|null
<?php return $this->executeStatement(
'DELETE FROM ' . $table . ' WHERE ' . implode(' AND ', $conditions),
$values,
is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types
);
}
<?php $this->addCriteriaCondition($criteria, $columns, $values, $conditions);
if (is_string(key($types))) {
$types = $this->extractTypeValues($columns, $types);
}
<?php 'INSERT INTO ' . $table . ' (' . implode(', ', $columns) . ')' .
' VALUES (' . implode(', ', $set) . ')',
$values,
is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types
);
}
<?php private function _bindTypedValues(DriverStatement $stmt, array $params, array $types): void
{
if (is_int(key($params))) {
$bindIndex = 1;
foreach ($params as $key => $value) {
<?php private function needsArrayParameterConversion(array $params, array $types): bool
{
if (is_string(key($params))) {
return true;
}
<?php foreach ($sqlPart as $part) {
$this->sqlParts[$sqlPartName][] = $part;
}
} elseif ($isArray && is_array($sqlPart[key($sqlPart)])) {
$key = key($sqlPart);
$this->sqlParts[$sqlPartName][$key][] = $sqlPart[$key];
} elseif ($isMultiple) {
<?php $this->sqlParts[$sqlPartName][] = $part;
}
} elseif ($isArray && is_array($sqlPart[key($sqlPart)])) {
$key = key($sqlPart);
$this->sqlParts[$sqlPartName][$key][] = $sqlPart[$key];
} elseif ($isMultiple) {
$this->sqlParts[$sqlPartName][] = $sqlPart;
<?php $offset = 0;
while (($handler = current($patterns)) !== false) {
if (preg_match('~\G' . key($patterns) . '~s', $sql, $matches, 0, $offset) === 1) {
$handler($matches[0]);
reset($patterns);
<?php $row = $this->connection->fetchAssociative($query);
self::assertNotFalse($row);
self::assertSame($identifier, key($row));
}