I\'ve done a lot of searching, but can\'t find anything about my issue. I\'m using PDO with Driver PDO_DBLIB to access a MS SQL database. I generally use prepared statements, but if any query fails I
I\'m trying to use Dependency Injection and Factory class. I\'ve read quite a bit about this and seen a lot of examples.开发者_StackOverflow社区 But I don\'t think I\'m using DI correctly (of Facotry
I know very little SQL, but found a command for SQL Server to add a column to the database if it doesn\'t already exist.Sadly it doesn\'t work when executed against my MySQL database, returning a synt
How can I determine the time a statement took to execute on the database server with PDO? I am using MySQL.Most MySQL client utilities seem to be able to show how long a query ran on the server, irre
This is my code public function alpha() { $alpha = NULL; $sql = \"SELECT SUBSTRING(`last_name`, 1, 1) AS alpha,
I have been using this for a while, but have since then upgraded to PDO instead of mysql queries. But I can\'t seem to get this particular snippet to work at all.
I am trying to extend the PDO cla开发者_运维知识库ss as well as turn it into a singleton. The only problem is that PDO\'s constructor is public, and PHP will not let me override it as a protected meth
I have a script which uses __autoload() to load classes (stupid, I know, this is old code I used to use for fun / testing), and it seems to be trying to autoload PDO. This leads me to believe that i开
UPDATE 1: I now have the following code: } catch( PDOException $e ) { error_log( $e -> getMessage() );
I\'ve got the following query which works great when pasted into开发者_StackOverflow an SQL client but doesn\'t work when I\'m executing it through PDO.