| @@ 615-629 (lines=15) @@ | ||
| 612 | * @return String success or false |
|
| 613 | * |
|
| 614 | */ |
|
| 615 | public function deleteLiveSpotterDataByIdent($ident) |
|
| 616 | { |
|
| 617 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
|
| 618 | $query = 'DELETE FROM spotter_live WHERE ident = :ident'; |
|
| 619 | ||
| 620 | try { |
|
| 621 | ||
| 622 | $sth = $this->db->prepare($query); |
|
| 623 | $sth->execute(array(':ident' => $ident)); |
|
| 624 | } catch(PDOException $e) { |
|
| 625 | return "error"; |
|
| 626 | } |
|
| 627 | ||
| 628 | return "success"; |
|
| 629 | } |
|
| 630 | ||
| 631 | /** |
|
| 632 | * Deletes all info in the table for an id |
|
| @@ 637-651 (lines=15) @@ | ||
| 634 | * @return String success or false |
|
| 635 | * |
|
| 636 | */ |
|
| 637 | public function deleteLiveSpotterDataById($id) |
|
| 638 | { |
|
| 639 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
|
| 640 | $query = 'DELETE FROM spotter_live WHERE flightaware_id = :id'; |
|
| 641 | ||
| 642 | try { |
|
| 643 | ||
| 644 | $sth = $this->db->prepare($query); |
|
| 645 | $sth->execute(array(':id' => $id)); |
|
| 646 | } catch(PDOException $e) { |
|
| 647 | return "error"; |
|
| 648 | } |
|
| 649 | ||
| 650 | return "success"; |
|
| 651 | } |
|
| 652 | ||
| 653 | ||
| 654 | /** |
|