Answer the question
In order to leave comments, you need to log in
Inserting an array into a database?
When you run the script, the data should be updated in the database, but for some reason not
<?php
include $_SERVER['DOCUMENT_ROOT']."/include/config.php";
$text = '/check c465ea378a4f';
preg_match('~/check ([a-z0-9]+)~i', trim($text), $preg);
print_r($preg);
foreach ($preg as $key => $value) {
$sql = $db->query('UPDATE `orders` SET `chat_id` = 123456 WHERE `orders`.`identify` = "'.$value.'"');
}
//echo print_r($preg);
//$idet = 1;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question