Correct docblocks in mysqli and pdo. #1510

Merged
merged 1 commit into from Oct 4, 2012

Projects

None yet

3 participants

@stefanneculai

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.

@stefanneculai

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

@elinw

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."

@LouisLandry

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

@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