$wpdb get_var issue

I’ve been at this for while, but can’t figure out why the below isn’t working. I have my date saved as a ‘MM/DD/YYYY’ string.

global $wpdb;
$new_day = $day->format("m/d/Y");
$qty = $wpdb->get_var( $wpdb->prepare( 
  "
    SELECT qty
    FROM $wpdb->specials
    WHERE date = %s
  ",
  $new_day
));

Related posts

Leave a Reply

1 comment