Curt Posted September 1, 2013 Share Posted September 1, 2013 I was introduced to PDO recently and it seems nice from what I have learned about it so far. I am curious about others opinions about it. I noticed its built in with new PHP versions. Seems like a rather old function but I have never heard mention of it here. I searched pdo and found nothing so I figured I'll make a thread. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 1, 2013 Share Posted September 1, 2013 http://php.net/pdo Quote Link to comment Share on other sites More sharing options...
Script47 Posted September 1, 2013 Share Posted September 1, 2013 I started using it, I converted a project to it, and will hopefully write any new projects in PDO. If you need any help do ask! :) PDO Tutorial Quote Link to comment Share on other sites More sharing options...
Curt Posted September 1, 2013 Author Share Posted September 1, 2013 http://www.phpro.org/tutorials/Introduction-to-PHP-PDO.html That is a great tutorial if anyone is interested.... I don't need any help with it, I seem to understand it so far. Thanks for the offer though. Quote Link to comment Share on other sites More sharing options...
DeathsAlive Posted September 2, 2013 Share Posted September 2, 2013 I really like PDO. But then again, after studying programming and OOP (object oriented programming) for two years at college and then two years at University. I love objective programming :L Quote Link to comment Share on other sites More sharing options...
Lucifer.iix Posted November 17, 2013 Share Posted November 17, 2013 (edited) If these prepared statements are getting stored on the serverside so they can be shared, that would make a difference of course. Because than you would have better, re-usable and stable SQL code with a little bit of overhead. But i just `generate` my php/sql code from the database. So i know all the names, types, relations, constains, so i can use set theory and monads to do this stuff. Persons::Insert(...,...,...)(); '()' <- Invoking the magic monad, that creates the whole thing. so i can pass it around leazy, and invoke it on a `foreach` itterator. Like: foreach(Model::Persons->Top(5000)->Page(2, 50)->OrderBy(Model::Person::FirstName, Model::Person::LastName)->Join(Model::Account)->Where(Model::Person->FirstName->Like("A*")) as $Person) { [here the magic happens..] => object: Linq2PHPEntities->Invoke() = Record Itterator ! } It's called 'Monads': http://en.wikipedia.org/wiki/Monad_(functional_programming) So: File("longfile.txt")->Columns(";")->Column(2)->Average() => Not a result, it's a function chain that when invoked will result in a itterator with a list. The whole things is a expression tree from a chain of functions. The only thing i need objects for is to tell the stupid php language what type, what it is. So Max(Array(array(1,2,3,4), array(3,4,5,6))) => Array(4,6) so i can bind: WithResult->Column(2) => array(6) or with WithResult->Max() = 6. That means: Yes, Model::Person->TelephoneNumber->Like("A*") wil make ZEND studio know this is wrong before even TRY to run a test on this. Because it's not in my numbermonad, so even intelliscence when writing code know's it's a number and not text. So it's totally type safe and i don't use STRINGS in my expression tree to build SQL. That means: "Find Reference" gives me ALL the references of a object. He never can find them inside a SQL string. So you don't know where "firstname,...... from persons....." is used, and your programming enviorment doesn't know. When using types, you can ofcourse. Happy Hacking: Roger. Ps: Good video and extreemly hot babe: Or a dull old man from Microsoft Research: (The genius: Brian Backman) Edited November 17, 2013 by Lucifer.iix Had to throw in the chick... could'n resist.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.