public static function removeProduct($barcode, $expiration) { $mysql = new Mysql(); $update = $mysql->update("delete from product where barcode='{$barcode}' and expiration='{$expiration}'"); $mysql->closeConnection(); return $update; }
public static function getClient($email, $password) { $mysql = new Mysql(); $response = $mysql->query("select * from client where email='{$email}' and password=PASSWORD('{$password}')"); $mysql->closeConnection(); if ($response == false) { return false; } $response = mysql_fetch_assoc($response); $client = new Client($response['name'], $response['surname'], $response['email'], $response['password']); return $client; }