$pdo = new PDO('mysql:host=localhost;dbname=my_db', 'my_user', 'my_password');
$st = $pdo->prepare('INSERT INTO `orders` (`email`) VALUES (:email)');
$st->execute([':email' => $email]);
CREATE TABLE `persons` (
`id` bigint not null auto_increment,
`name` varchar(100) not null,
`parent_id` bigint,
primary key(`id`),
unique(`name`), // ну наверное
unique(`parent_id`), // у одного отца не может быть больше одного сына,
constraint `fk_persons_2_persons` foreign key (`parent_id`)
references `persons` (`id`)
on delete cascade
on update cascade,
);
PHP Warning: preg_match(): Unknown modifier '�' in /var/www/test/queasy/regtest.php on line 5
PHP Stack trace:
PHP 1. {main}() /var/www/test/queasy/regtest.php:0
PHP 2. preg_match() /var/www/test/queasy/regtest.php:5
"seedling[' + key + ']"
?