Home >Backend Development >PHP Tutorial > 各位,帮小弟我优化一下这个SQL语句

各位,帮小弟我优化一下这个SQL语句

WBOY
WBOYOriginal
2016-06-13 12:37:071014browse

各位大虾,帮我优化一下这个SQL语句
各位大虾,帮我优化一下这个SQL语句
$sql = " UPDATE `".$table."` SET $field = concat('".$value['result']."{hx}',now(),'{hx}".$value['name']."{hx}".$value['op']."{hx}".$value['suggestion']."') $auditing  WHERE `id`=".$value['id'];
global $conn;
mysql_query($sql,$conn);
if($auditing == ",`check`='yes'"){
$sql = "SELECT `mu_id` FROM `$table` WHERE `id` = $value[id] LIMIT 1";
$sql = mysql_query($sql,$conn);
$mu_id = mysql_fetch_array($sql);
$sql = "UPDATE `member_user` SET `check`='yes',`updatetime`=now() WHERE `id` = $mu_id[0]";
mysql_query($sql,$conn);
}
unset($conn);
return "审批成功";

sql 优化 mysql PHP
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn