Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Correct docblocks in mysqli and pdo. #1510

Merged
merged 1 commit into from Oct 4, 2012

Conversation

Projects
None yet
3 participants
Contributor

stefanneculai commented Sep 1, 2012

As PHP documentations says mysqli and PDO do not return integers all the time.

  • mysqli::$insert_id: The value of the AUTO_INCREMENT field that was updated by the previous query. Returns zero if there was no previous query on the connection or if the query did not update an AUTO_INCREMENT value. Note: If the number is greater than maximal int value, mysqli_insert_id() will return a string.
  • PDO::lastInsertId: If a sequence name was not specified for the name parameter, PDO::lastInsertId() returns a string representing the row ID of the last row that was inserted into the database. If a sequence name was specified for the name parameter, PDO::lastInsertId() returns a string representing the last value retrieved from the specified sequence object.

I have checked and insertid from the other database drivers and they return integers.

Contributor

stefanneculai commented Oct 4, 2012

I really wonder how much it takes to comment or merge such a simple pull request - one month so far.

Contributor

elinw commented Oct 4, 2012

Patience is a good thing :).
But I think the title makes it sound more confusing than it needs to be. Can you make it "Correct docblocks in mysqli and pdo."

Contributor

LouisLandry commented Oct 4, 2012

It takes two clicks to merge it ... not too much.

@LouisLandry LouisLandry added a commit that referenced this pull request Oct 4, 2012

@LouisLandry LouisLandry Merge pull request #1510 from stefanneculai/database
Correct docblocks in mysqli and pdo.
890b4ce

@LouisLandry LouisLandry merged commit 890b4ce into joomla:staging Oct 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment