Closed tablecell closed 4 years ago
as readme.md documented
$name='test'; $pass='test'; $email='test@my.com'; $sql = "INSERT INTO users VALUES (NULL,?,?,?)"; $user = DB::prepare($sql)->execute([$name,$pass,$email])->fetch(); $id = DB::lastInsertId(); echo $id;
table schema is
CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `pass` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
what are you trying to fetch from the INSERT query?
as readme.md documented
table schema is