Sep 07

Propel Criteria Builder

Those for somones who really dont like to write criteria code (it’s me ;-))

This is utility that converts SQL into PHP Propel code. I found it really usefull.

P.S. Thanks to Alex Filatov for this link.

Author: symfonian


Alex Filatov
September 7, 2007

You’re welcome 🙂
BTW, I like to write Criteria code 🙂

September 10, 2007

Glad you like it, and thanks for posting it. My next step on this is to convert it to a symfony plugin, and then add some of the improvements at the bottom of the page. Should you want to get involved in the development of this, feel free to join in the discussion on the related thread in the fora!

September 10, 2007

Oh it’s great honor! author of this great tool itself commented my post. Thanks a lot and I’ll keep an eye on its progress for sure.

September 12, 2007

Thank you for your kind comments. On a related note, I’d urge all readers – especially new users of Propel – to use some sort of code completion where they can. I am using Eclipse PDT, and it really has simplified the writing of Criteria code; with the right settings, pretty much everything can be made “look ahead”.

February 27, 2008

Hi, Is there any converter for mysql to propel criteria code???

February 27, 2008

Yes, actually the link in article is exactly converter for mysql to propel criteria code or I did not understand the question

February 27, 2008

how can i got the id,name from my table according to my id??

February 27, 2008


February 27, 2008

I give like this,,,customer.accono where’$id’ but i got the result as
$c = new Criteria();
$crit0 = $c->getNewCriterion(CustomerPeer::NAME, ‘$name’);

What is wrong with me??

February 27, 2008

Well, sorry but actually I’m not developer of that convertor service. Not sure why you are asking about this here 🙂

May 15, 2008

The linked page is not working any more.
It has the symfony Oops page LOL!

June 3, 2008

go here

btw, how to convert this to propel:

SELECT teachersfname as tfn, teacherslname as tln FROM `teachers` UNION SELECT fname as tfn, lname as tln FROM `students` ORDER BY tfn

June 3, 2008
September 23, 2009

Thanks, It helped me on a tough query

October 5, 2011

hey guys, help me, how to convert this to propel:

select, b.title, b.start_time, b.end_time from tv_channel a
left join tv_program b on = b.tv_channel_id and b.start_time >= ‘2011-09-23 12:00:00’ and b.end_time <= '2011-09-23 14:30:00'
order by a.code
limit 0, 10;

–pager object

Comments RSS TrackBack Identifier URI

Leave a comment