Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function update($table,$arr,$arr0){
- $stm="";
- foreach ($arr as $key => $value) {
- $stm.= " $key = '$value' and";
- }
- $stm = substr($stm,0,-3);
- $stm0="";
- foreach ($arr0 as $key => $value) {
- $stm0.=" $key = '$value' and";
- }
- $stm0 = substr($stm0,0,-3);
- return $this->conn->query("UPDATE $table set $stm WHERE $stm0");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement