I simply knew we would need the extension capability that the Mdl class allows for sooner or later, I didn’t expect it to be this soon though. The main problem here is saving a many to many relationship straight to the database from the $_POST array, to do that we can extend Doctrine Record with a new function I have named fromArrayExt which adds something extra to the normal fromArray method.
I’ve had problems with both Zend Session and the Zend Controller. It just feels like too much fighting and since the plan is to replace Zend DB with Doctrine there is only the controller and session left and unwanted to boot.
The session logic can easily be replicated in a more lightweight form, so can the routing and that is what this tutorial is about. We are creating an MVC setup where M is Doctrine, V is Smarty and C is our own stuff we do here. The Zend Framework has been reduced to just another component library for me now, I will pick goodies when I need them.
Why Smarty? Because I have to use it, and believe it or not I’ve come to like Smarty, to the point where I think the normal way of doing things looks messy. Call me uncool, call me crazy, heck you can even call me a bad PHP programmer, I’ll still like Smarty.
The goal here is to replicate the functionality demonstrated in the Merb registration tutorial. We don’t want the framework to stifle us, but at the same time we want to feel empowered.
It was long overdue but finally I’ve taken a look at Doctrine. And I’m blown away, bye bye Zend DB.
I’ve been whining about Zend Controller before, how it forces me to do things I don’t want to do. Therefore it’s my intention to simply write my own routing and I’m basically finished with the basics already but let’s focus on that in the next article because this will surely turn into a series :) .
Welcome to The ZendCon Sessions. This episode of The ZendCon Sessions was recorded live at ZendCon 2007 in Burlingame, CA.
We hope you enjoy today's session as we listen to Thornsten Rinne present "IBM DB2 with PHP 5.2 and AJAX".
The ZendCon Sessions are distributed under a creative commons Attribution-Noncommercial-No Derivative Works 3.0 License, Please honor this license and the rights of our authors.
PHP developers often encounter instances when their PHP scripts must adhere to a variety of different platforms. Often this includes database interactivity. While many PHP developers write code to interact with MySQL, larger enterprises do not deploy MySQL. To accommodate a larger base of users, a developer might want to adopt the practice of cross-platform development.
Sometimes it can be useful to have a dump of the current database schema. The script below reads the schema from a MySQL database and outputs XML that describes the schema.
At first we connect to a MySQL database and use the SHOW TABLES command to return all the tables in the database. Next, we iterate over each table and return the fields for each table using the SHOW FIELDS command. Finally, we put all of the returned information into XML.
This article explains how to create a fixed-size FIFO (first-in, first-out) queue in SQL, where rows added after a threshold will cause the oldest row to be deleted. There are several ways to do this, but MERGE on Oracle and DB2, and MySQL’s non-standard extensions to SQL, make an elegant solution easy.
I was just putting together a small test program and I thought I would try using PDO. I really haven't done anything serious with PDO, just try it a couple times. After recompiling PHP to include the mysql driver for PDO, I coded up the first version of my test program ...
The use of abstraction layers is a controversial topic among PHP users. There are many reasons why people use them, and likewise why they don’t. The fact is, abstraction layers will always be around and they provide a very quick way of creating applications, even though for very high traffic sites, it may be a performance hit to use large libraries if they aren’t properly scripted. In this article I will be going through the advantages and disadvantages of using the ADODB database abstraction layer. This article is biased in it’s favour but I will also be discussing the disadvantages of using it also.
While there is already a number of cheat sheets for Postgresql external link available on the web, I couldn't find one in this format and with the kind of information I wanted, so I wrote one.








