Posts tagged with ‘symfony’

Symfony 1.4: How to sort foreign key record?

advertisement

symfonyHave been looking for way to sort foreign key records in Symfony 1.4 for few days. I’ve a staff table with a foreign key to comments. Whenever i call the StaffTable->getComments() the records return is not in alphabetical order. Finally i found some helpful tips from a forum (sorry i lost the forum url), and i manage to sort foreign key record with just a line of code. 🙂

To sort foreign key record in Symfony 1.4, follow the steps below:-

Continue reading Symfony 1.4: How to sort foreign key record? »

Symfony: How to escape hash # character in yaml

advertisement

Just a quick note for myself to escape # character in yaml – Symfony. When i’m trying to load batch data, some of the record seems not imported successfully especially with hash # character. By default, all the string behind the hash # character is treated as comment.

Here’s the example to escape hash # character:-

Continue reading Symfony: How to escape hash # character in yaml »

Symfony: How to query using Criteria OR

advertisement

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 i can say in Propel. Here’s the example of how to perform the SQL query for:

Continue reading Symfony: How to query using Criteria OR »