Welcome Guest, Not a member yet? Register   Sign In
Why no PDO database driver documentation?
#1

[eluser]sidley74[/eluser]
I was in the process of creating my own PDO-using database wrapper when I realized that CodeIgniter has an utterly undocumented PDO extension for the database driver as of sometime in 2011. There is, however, absolutely no mention of its existence anywhere in the documentation (but sure enough, there the file was in the source code...)
#2

[eluser]CroNiX[/eluser]
Not sure why it's not in the docs, but it is in the changelog for 2.1.
#3

[eluser]Abel A.[/eluser]
Very true. Though looks like the ppl at CI are not putting much attention to CI Sad
#4

[eluser]CroNiX[/eluser]
Based on what? Have you not seen all of the commits since CI 2.1 for the upcoming CI 3? As of now (and growing daily), it goes back 45 pages to the November 14, 2011 release of CI 2.1.
#5

[eluser]sidley74[/eluser]
[quote author="CroNiX" date="1338589038"]Not sure why it's not in the docs, but it is in the changelog for 2.1.[/quote]

Yup, that's the only place I've found mention of it. Nothing in the documentation.

Also, maybe I just missed it, but looking over the file, I didn't see any support for using PREPARE or binding variables-- really the main points of using PDO in the first place. PDO with only support for QUERY is pretty useless.
#6

[eluser]CroNiX[/eluser]
I know they have greatly improved it in the upcoming CI 3, which you can grab on github (still called 2.1 until release).
#7

[eluser]Sweden[/eluser]
Hello!

I would also like to use PDO with prepare/execute for my database communication.

I've checked the latest on github, and there is no prepare/Execute in their as I could find.

How can I use PDO with CodeIgniter?

Thanks /John S
#8

[eluser]Abel A.[/eluser]
PDO is its own class. All CI does is initialize the pdo class.
#9

[eluser]sidley74[/eluser]
[quote author="berkguy" date="1339534964"]PDO is its own class. All CI does is initialize the pdo class. [/quote]

Then that needs to documented somewhere-- anywhere.

Because that's not at all how the other database driver classes work.
#10

[eluser]Sweden[/eluser]
Hello again! Thanks for your replies!

Actually I dont understand quite how to use PDO with CI, can you give me very basic example and that would be very helpful.

/John S




Theme © iAndrew 2016 - Forum software by © MyBB