We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

What does $DB->insert_id return if there is no primary key defined?

Development and Programming

Eric Snyder's avatar
Eric Snyder
202 posts
16 years ago
Eric Snyder's avatar Eric Snyder

Title says it all…does anybody know off hand?

       
Eric Snyder's avatar
Eric Snyder
202 posts
16 years ago
Eric Snyder's avatar Eric Snyder

It returns a zero. I want to be able to go back and delete the row I just inserted at a later time. For the tables that have and autoincrimenting primary index it would work fine to use the result of $DB->insert_id but want about those tables that do not?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.