CREATE TABLE IF NOT EXISTS `nome_tabela` ( `id` int(5) unsigned zerofill AUTO_INCREMENT NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
<? require_once("conexao.php"); $pdo->exec("INSERT INTO nome_tabela VALUES()"); $last_id = $pdo->lastInsertId(); echo $last_id; ?>
Related posts:

