Viewing 1 replies (of 1 total)
  • simplebookingcalendar

    (@simplebookingcalendar)

    Here’s a start:

    <?php
    $calendarID = 1;
    $sql = $wpdb->prepare('SELECT * FROM ' . $wpdb->base_prefix . 'sbc_calendars WHERE calendarID=%d',$calendarID);
    $calendar = $wpdb->get_row( $sql ); $bookedDates = json_decode($calendar->calendarData, true);
    
    if(isset($bookedDates[date('Y')][date('m')][date('j')]) && $bookedDates[date('Y')][date('m')][date('j')] != 'default'){
        echo "Booked";
    } else {
        echo "Not Booked";
    }
    ?>

    for more info you can: print_r($calendar

Viewing 1 replies (of 1 total)
  • The topic ‘day status’ is closed to new replies.