setAttribute(PDO::ATTR_EMULATE_PREPARES, false); $p1 = '2023-02-03'; $p2 = '2023-02-25'; # demo of querying non-partitioned table $sql = "select * from t1 where created_at in (?, ?)"; $stmt = $db->prepare($sql); $stmt->execute([$p1, $p2]); $stmt->fetchAll(); echo "count: " . $stmt->rowCount() . "\n"; # # demo of querying partitioned table $sql = "select * from t2 where created_at in (?, ?)"; $stmt = $db->prepare($sql); $stmt->execute([$p1, $p2]); $stmt->fetchAll(); echo "count: " . $stmt->rowCount() . "\n";