Commit a4197840 by lmf

删除脚本

parent 9e434ed6
<?php
$dbhost = '127.0.0.1'; // mysql服务器主机地址
$dbuser = 'us_joshine'; // mysql用户名
$dbpass = 'us_joshine'; // mysql用户名密码
$conn = mysqli_connect($dbhost, $dbuser, $dbpass,"42EQ-Gh)]xWqAC5M");
if(! $conn )
{
die('Could not connect: ' . mysqli_error());
}
$list = "SELECT * from `catalog_product_entity_text` WHERE `value` LIKE \"%joshine.cn%\" ";
$result = mysqli_query($conn,$list);
if ($result){
$date = mysqli_fetch_all($result);
foreach ($date as $key => $val){
$key = $val[0];
$content = explode("<p><img",$val[4]);
$content = $content[0];
$sql = "UPDATE `catalog_product_entity_text` SET value = '{$content}' WHERE `catalog_product_entity_text`.`value_id` = $key";
if(mysqli_query($conn, $sql)){
echo "记录已成功更新。";
} else {
echo "错误:无法执行 $sql. " . mysqli_error($conn);
}
exit;
}
}
mysqli_close($conn);
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment