1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/manual/codes/Basic Components - Query - Method overloading.php

21 lines
496 B
PHP
Raw Normal View History

2006-07-24 01:08:06 +04:00
<?php
$session = Doctrine_Manager::getInstance()->openSession(new PDO("dsn","username","password"));
$query = new Doctrine_Query($session);
$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();
?>