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

21 lines
493 B
PHP
Raw Normal View History

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