πŸ“Š PHP
Q. Which PHP function returns the last inserted ID in a PDO connection?
  • (A) last_insert_id()
  • (B) get_last_id()
  • (C) $pdo->lastInsertId()
  • (D) $pdo->insert_id
πŸ’¬ Discuss
βœ… Correct Answer: (C) $pdo->lastInsertId()

Explanation: The lastInsertId() method returns the ID of the last inserted row.

Explanation by: Rati Dubey
The lastInsertId() method returns the ID of the last inserted row.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
27
Total Visits
πŸ“½οΈ
3 mo ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
80%
Success Rate