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.
You’re welcome
BTW, I like to write Criteria code ![]()
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!
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.
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
ClassPeer::retrieveByPK($id)
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??
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 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
June 3, 2008
sorry, it’s http://propel.jondh.me.uk/
Comments RSS TrackBack Identifier URI
Leave a comment






13 Comments