From 66a9311caeedaa4ffa86c75c5f8ff44f1b5d7f7b Mon Sep 17 00:00:00 2001 From: Malte Schulze Hobeling Date: Wed, 18 Jan 2023 09:13:01 +0100 Subject: [PATCH] fix --- BancaDati/BancaDati.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BancaDati/BancaDati.php b/BancaDati/BancaDati.php index 2021338..7dc16f4 100644 --- a/BancaDati/BancaDati.php +++ b/BancaDati/BancaDati.php @@ -114,7 +114,7 @@ class BancaDati { if($whereString != ""){ $whereString .= " AND "; } - $whereString .= "`" . $col . "` = '" . $v . "'"; + $whereString .= "`" . $col . "` LIKE '" . $v . "'"; } $sql = "SELECT * FROM ".$table." WHERE ".$whereString.";"; if(isset($order["by"])){ @@ -124,8 +124,7 @@ class BancaDati { $sql .= $order["order"]; } try { - var_dump($sql); - return $this->pdo->query($sql); + return $this->pdo->query($sql)->fetch(); }catch (PDOException $e){ die; }