<?php

$pdo = new PDO('mysql:host=localhost;dbname=inveetaire', 'root', '');
$g = $pdo->query('SELECT guest_code FROM guests WHERE is_deleted = 0 LIMIT 1')->fetch();
if ($g) {
    echo "PUBLIC INVITATION: http://localhost/inveetaire/i/{$g['guest_code']}\n";
} else {
    echo "NO GUESTS FOUND\n";
}
