2006-07-24 01:08:06 +04:00
|
|
|
<?php
|
2006-08-22 02:51:27 +04:00
|
|
|
$conn = Doctrine_Manager::getInstance()->openConnection(new PDO("dsn","username","password"));
|
2006-07-24 01:08:06 +04:00
|
|
|
|
2006-08-22 02:51:27 +04:00
|
|
|
$query = new Doctrine_Query($conn);
|
2006-07-24 01:08:06 +04:00
|
|
|
|
|
|
|
$query->from("User-b")
|
|
|
|
->where("User.name LIKE 'Jack%'")
|
2006-07-26 21:09:00 +04:00
|
|
|
->orderby("User.created")
|
2006-07-24 01:08:06 +04:00
|
|
|
->limit(5);
|
|
|
|
|
2006-07-26 21:09:00 +04:00
|
|
|
$users = $query->execute();
|
|
|
|
|
|
|
|
$query->from("User.Group.Phonenumber")
|
|
|
|
->where("User.Group.name LIKE 'Actors%'")
|
|
|
|
->orderby("User.name")
|
|
|
|
->limit(10)
|
|
|
|
->offset(5);
|
|
|
|
|
2006-07-24 01:08:06 +04:00
|
|
|
$users = $query->execute();
|
|
|
|
?>
|