Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function topic_needs_resubscribing($hub_topic)
  2. {
  3. $pdo = getPdo();
  4. $query = $pdo->prepare("SELECT `expires_at` < ? as `expired` FROM `subscriptions` WHERE `hub_topic` = ? ORDER BY `expires_at` DESC LIMIT 1");
  5. $query->execute([
  6. time(),
  7. $hub_topic
  8. ]);
  9.  
  10. return (int) $query->fetchColumn(0) === 1;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement