SELECT REPLACE (TRANSLATE(Phone
, REPLACE(TRANSLATE(Phone, '0123456789', '##########'), '#', '')
, REPLICATE('#', LEN(REPLACE(TRANSLATE(Phone, '0123456789', '##########'), '#', ''))))
, '#', '')
FROM Table
require_once('vendor/autoload.php');
require_once 'connection.php';
use DiDom\Document;
$document = new Document('https://habr.com/ru/all/', true);
$posts = $document->find('.post');
$last5posts = array_slice($posts, 0, 5);
$link = mysqli_connect($host, $user, $password, $database)
or die("Ошибка " . mysqli_error($link));
foreach($last5posts as $post) {
$post = $post->text();
$query_i ="INSERT INTO posts VALUES(NULL, '$post')"; //дбавляем данные в таблицу
$result_i = mysqli_query($link, $query_i) or die("Ошибка " . mysqli_error($link));
}
$nameValue = $document->find('.post');
require_once('vendor/autoload.php');
require_once 'connection.php';
use DiDom\Document;
$document = new Document('https://habr.com/ru/all/', true);
$posts = $document->find('.post');
$last5posts = array_slice($posts, 0, 5);
$link = mysqli_connect($host, $user, $password, $database)
or die("Ошибка " . mysqli_error($link));
foreach($last5posts as $post) {
$post = $post->text();
$query_i ="INSERT INTO posts VALUES(NULL, '$post')"; //дбавляем данные в таблицу
$result_i = mysqli_query($link, $query_i) or die("Ошибка " . mysqli_error($link));
}
foreach($last5posts as $post) {
$post = $post->text();
$query_i ="INSERT INTO posts VALUES(NULL, '$post')"; //дбавляем данные в таблицу
$result_i = mysqli_query($link, $query_i) or die("Ошибка " . mysqli_error($link));
}
$query_s ="SELECT post FROM posts"; //извлекаем данные из таблицы
$result_s = mysqli_query($link, $query_s) or die("Ошибка " . mysqli_error($link));