Login #1
@@ -71,7 +71,7 @@ class BancaDati {
 | 
				
			|||||||
    public function update(string $table, string $id, array $values){
 | 
					    public function update(string $table, string $id, array $values){
 | 
				
			||||||
        $value = "";
 | 
					        $value = "";
 | 
				
			||||||
        foreach ($values as $col => $v){
 | 
					        foreach ($values as $col => $v){
 | 
				
			||||||
            $value .= $col . "=" . $v . ",";
 | 
					            $value .= $col . "=" . "'" . $v . "'" . ",";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        $value = trim($value, ",");
 | 
					        $value = trim($value, ",");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -80,6 +80,7 @@ class BancaDati {
 | 
				
			|||||||
            $sth = $this->pdo->prepare($sql);
 | 
					            $sth = $this->pdo->prepare($sql);
 | 
				
			||||||
            $sth->execute();
 | 
					            $sth->execute();
 | 
				
			||||||
        }catch (PDOException $e){
 | 
					        }catch (PDOException $e){
 | 
				
			||||||
 | 
					            var_dump($e);
 | 
				
			||||||
            die;
 | 
					            die;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user