1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/manual/codes/DQL (Doctrine Query Language) - Conditional expressions - Like Expressions.php
2006-10-20 19:31:37 +00:00

9 lines
275 B
PHP

<?php
// finding all users whose email ends with '@gmail.com'
$users = $conn->query("FROM User u, u.Email e WHERE e.address LIKE '%@gmail.com'");
// finding all users whose name starts with letter 'A'
$users = $conn->query("FROM User u WHERE u.name LIKE 'A%'");
?>