add: delete items from list
This commit is contained in:
@@ -9,7 +9,7 @@ class BancaDati {
|
||||
private $dbName = "BancaDati";
|
||||
private $linkName = "localhost";
|
||||
private $user = "root";
|
||||
private $pw = "root";
|
||||
private $pw = "";
|
||||
|
||||
public $pdo;
|
||||
public function __construct() {
|
||||
@@ -55,8 +55,10 @@ class BancaDati {
|
||||
try {
|
||||
$sth = $this->pdo->prepare($sql);
|
||||
$sth->execute();
|
||||
return $this->pdo->lastInsertId();
|
||||
}catch (PDOException $e){
|
||||
die;
|
||||
return false;
|
||||
//die;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +130,7 @@ class BancaDati {
|
||||
}
|
||||
$sql = "SELECT * FROM " . $table . ((count($where) > 0) ? " WHERE ".$whereString.$orderString : "") .";";
|
||||
try {
|
||||
return $this->pdo->query($sql)->fetchAll();
|
||||
return $this->pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC);
|
||||
}catch (PDOException $e){
|
||||
die;
|
||||
}
|
||||
|
Reference in New Issue
Block a user