Sep 07
Digg
Stumbleupon
Technorati
Delicious

Propel Criteria Builder

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

http://propel.jondh.me.uk/criteria/analyse

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

15 Comments

Alex Filatov
September 7, 2007

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

halfer
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!

narkov
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.

halfer
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”.

kannapiran_86
February 27, 2008

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

admin
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

kannapiran_86
February 27, 2008

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

admin
February 27, 2008

ClassPeer::retrieveByPK($id)

kannapiran_86
February 27, 2008

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

What is wrong with me??

admin
February 27, 2008

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

alex
May 15, 2008

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

cipryan
June 3, 2008

go here http://propel.jondh.me.uk/criteria/analyse

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

cipryan
June 3, 2008
pfwd
September 23, 2009

Thanks, It helped me on a tough query

Jagi
October 5, 2011

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

select a.id, b.title, b.start_time, b.end_time from tv_channel a
left join tv_program b on a.id = 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
tnx

Comments RSS TrackBack Identifier URI

Leave a comment