Archive for the 'PHP' Category

How to install apache, php, mysql with macport in Mac OS X

Monday, July 14th, 2008

The easiest way to install apache, php and mysql in Mac is thru mac port. You can also install apache, php and mysql by compiling each of the service but it’s too time consuming. If you just wan to install apache, php and mysql for development use, Mac Port install is good enough.
Follow the steps [...]

Symfony: How to query using Criteria OR

Tuesday, May 13th, 2008

I’m looking for way to do a simple query using criteria OR in symfony framework. The official documentation does not covers the sql query criteria for OR statement. After googling for while, there is some reference from the Propel Guide
To perform a simple SQL query with OR criteria is a bit complicated in symfony or [...]

Symfony: Control Model->save() function to perform INSERT or UPDATE

Friday, April 4th, 2008

In Symfony Framework, Model->save() function is clever enough to determine to use INSERT or UPDATE for the query. But i’ve tried many ways to perform an UPDATE for my record but failed. It keep INSERT new record. Finally i found the solution to control the Model->save() function to perform INSERT or UPDATE.
Just a simple example:-
Assume [...]