This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
EDT/admin/debug/alter_kh_remark.php
T
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

31 lines
878 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
//-------------------------------------------------------处理备注字段
require "../config.php";
include "../../tmpl/config.php";
require THIS_FILE_ROOT."/include/function.php";
require THIS_FILE_ROOT."/include/db_mysql.php";
//require THIS_FILE_ROOT."/include/page.class.php";
error_reporting(E_ERROR | E_WARNING | E_PARSE);
//-------------------------------mysql connect
$db=new DB_Sql;
$db->connect($dbhost,$dbuser,$dbpw,$dbname,"p");
//
$arr_zd=array("remark1"=>"买点","remark2"=>"说明");
$q="select * from ".$table_pre."kh";
$r=$db->query($q);
$i=1;
while($m=$db->fetch_array($r)){
$str="";
foreach($arr_zd as $k1 => $v1){
if(trim($m[$k1]))
$str.=$v1."".trim($m[$k1])."\r\n";
}
if($str){
$str=substr($str,0,-2);
$q1="update ".$table_pre."kh set remark='".$str."' where id='".$m["id"]."'";
$db->query($q1);
echo $i.".".$str."<br><br>";
$i++;
}
}
?>