Skip to content

Commit

Permalink
nevermind query deleted all apointments lol ignore that
Browse files Browse the repository at this point in the history
  • Loading branch information
sturzael committed Aug 20, 2018
1 parent ea25874 commit d2ab25a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions date.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
$end = date('Y-m-d H:i:s', strtotime( "$end - 10 hours"));//converting the time in NZ to GMT +2 as WP_Amelia uses Serbia timezones to read it
$count = $wpdb->get_var("SELECT * FROM `wp_amelia_appointments` WHERE `bookingStart` = '$start' AND `bookingEnd` = '$end'"); //checking wether it already exists in the database

$notCal = $wpdb->get_col("SELECT * FROM `wp_amelia_appointments` WHERE `bookingStart` <> '$start' AND `bookingEnd` <> '$end' AND `internalNotes` = 'freeBusy' AND `serviceId` = 4");

$notCal = $wpdb->get_col("SELECT * FROM `wp_amelia_appointments` WHERE `bookingStart` <> '$start' AND `bookingEnd` <> '$end' AND `internalNotes` = 'freeBusy' AND `serviceId` = 4"); //query broken

foreach ($notCal as $key => $value) {
$sql = $wpdb->delete('wp_amelia_appointments', array ('id' => $value));
Expand Down

0 comments on commit d2ab25a

Please sign in to comment.