23 lines
638 B
PHP
23 lines
638 B
PHP
<?php
|
|
require_once __DIR__ . '/config.php';
|
|
|
|
try {
|
|
$pdo = db();
|
|
$sql = "
|
|
CREATE TABLE IF NOT EXISTS attendees (
|
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
name VARCHAR(255) NOT NULL,
|
|
email VARCHAR(255) NOT NULL,
|
|
company VARCHAR(255),
|
|
occupation VARCHAR(255),
|
|
relation VARCHAR(50),
|
|
company_type VARCHAR(100),
|
|
linkedin_url VARCHAR(255),
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
);";
|
|
$pdo->exec($sql);
|
|
} catch (PDOException $e) {
|
|
// In a real app, you'd log this error.
|
|
// For this example, we'll just ignore it if the table already exists.
|
|
}
|