Pyh.conf’25: a new PHP conference for the Russian-speaking community

Voting

: five minus zero?
(Example: nine)

The Note You're Voting On

timer timer five at gmail dot com
8 years ago
About the connections created through classes

eg: db::SQL()->query();
then db::SQL()->lastInsertId();

it will create a new connection and will not return the last ID inserted. it is better to include a PDO connection file (or directly the logins) and work with it to get the last ID properly.

$db = new PDO(logins);
$db->query();
$db->lastInsertId();

<< Back to user notes page

To Top