1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Added simple COUNT() example

This commit is contained in:
Jonathan.Wage 2007-04-12 16:45:13 +00:00
parent e7e005308d
commit 4fc97fe1b8

View File

@ -1,3 +1,9 @@
<?php <?php
echo 'test'; // SELECT u.*, COUNT(p.id) num_posts FROM User u, u.Posts p WHERE u.id = 1
$query = new Doctrine_Query();
$query->select('u.*, COUNT(p.id) num_posts')
->from('User u, u.Posts p')
->where('u.id = ?', 1)
?> ?>