views:

30

answers:

1

Hi,

how to execute a propel query?

For example this:

$c = new Criteria();
$c->add(AuthorPeer::NAME, $name);

I know Doctrine method is execute() but using propel?

Regards

Javi

+1  A: 
$c = new Criteria();
$c->add(AuthorPeer::NAME, $name);
$result = AuthorPeer::doSelect($c);

For more details, see the reference.

or see this for the iterable collection way (Propel 1.5+).

Piskvor