I need a script to extract the database details from the wp-config.php file so I could keep the logon details in one location when I was coding something outside the WP framework. I came up with a class that does this, connects to mysql and selects the database. There are three connection options: PDO, mySQLi… Read more »
PDO – bindParams vs. bindValues
Posted by moflint & filed under OOP.
I was trying to supply binding params to a PDO query like this: However, this will not work. From the PHP manual – “Unlike PDOStatement::bindValue(), the variable is bound as a reference and will only be evaluated at the time that PDOStatement::execute() is called.” So, the correct way to do this would be: See also,… Read more »
Why use OOP when it takes longer?
Posted by moflint & filed under OOP.
Developing using OOP techniques takes longer in the intial code, but is easier to maintain. In the end it will save you time, produce less ‘buggy’ code, and help you write code that is re-usable.
Good OOP habits
Posted by moflint & filed under OOP.
Great article here www.ibm.com/developerworks/opensource/library/os-php-7oohabits
Latest posts
Associating template with file extension in Netbeans
Changing hostname on Linux server to FQD
Apache SSL – Multiple Certificates on a Single IP
Blog tags
bash
borders
CakePHP
characters
code completion
Conditional CSS
count words
date
directory size
Eclipse
File ownership
find directory size
find large files
Firefox
HTML
imagemap
Irfanview
javascript
Joomla
JQuery
limit words
linux
local mail server
Mercury Mail
modules
mysql
OOP
Pagination
PDO
permissions
php
PHP IDE
prepared statements
risk
ScribeFire
Security
sprintf
SSH
SVN
TSW Webcoder 2010
Tunellier
utf-8
widget
Wordpress
XML-RPC