Skip to content

Commit

Permalink
Update UsualToolMysql.php
Browse files Browse the repository at this point in the history
  • Loading branch information
usualtool authored Nov 21, 2022
1 parent 3eab1b4 commit d95dde3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/UsualToolMysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ public static function UpdateData($table,$data,$where){
$updatestr='';
if(!empty($data)):
foreach($data as $k=>$v):
if(preg_match('/\+\d/is',$v)):
$updatestr.=$k."=".$v.",";
else:
if(preg_match('/\+\d/is',$v)):
$updatestr.=$k."=".$v.",";
else:
$updatestr.=$k."='".$v."',";
endif;
endif;
endforeach;
$updatestr=rtrim($updatestr,',');
endif;
Expand Down

0 comments on commit d95dde3

Please sign in to comment.