コード例 #1
0
ファイル: ProductDAO.php プロジェクト: AyanUR/WebApplication
 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;
 }
コード例 #2
0
ファイル: ClientDAO.php プロジェクト: AyanUR/WebApplication
 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;
 }