echo arr[''];
function insertData($arr, $names, $path) {
$pathArr = explode('.', $path);
$lastKey = array_pop($pathArr);
foreach ($names as $lang => $value) {
$branch = &$arr[$lang];
foreach($pathArr as $pathPart) {
if(!isset($branch[$pathPart])) {
$branch = null;
break;
}
$branch = &$branch[$pathPart];
}
if(!$branch) continue;
if($lastKey === 'goods') {
if(!isset($branch['goods'])) $branch['goods'] = [];
$branch['goods'][] = $value;
} else if (!isset($branch[$lastKey])) {
$branch[$lastKey] = $value;
}
}
}
$mysqli = new mysqli("example.com", "user", "password", "database");
if ($mysqli->connect_errno) {
echo "Не удалось подключиться к MySQL: " . $mysqli->connect_error;
}
$res = $mysqli->query("SELECT 'выбора, чтобы угодить всем.' AS _msg FROM DUAL");
$row = $res->fetch_assoc();
echo $row['_msg'];
<?php echo addslashes($row['a_name']) ?>
select sum(added_links), sum(deleted_links), year, month, week
from (
select
YEAR(url.created_at) as year,
MONTH(url.created_at) as month,
WEEK(url.created_at) as week,
1 as added_links,
0 as deleted_links,
from url
where url.created_at IS NOT NULL
UNION ALL
select
YEAR(url.deleted_at) as year,
MONTH(url.deleted_at) as month,
WEEK(url.deleted_at) as week,
0 as added_links,
1 as deleted_links,
from url
where url.deleted_at IS NOT NULL
)
group by year, month, week
Интересует сам процесс перехода, чтобы все данные можно было мигрировать в новую 1ску, возможно ли это и какие проблемы могут возникать?