Skip to content

Instantly share code, notes, and snippets.

@irwinv
Created June 25, 2012 14:58
Show Gist options
  • Save irwinv/2989143 to your computer and use it in GitHub Desktop.
Save irwinv/2989143 to your computer and use it in GitHub Desktop.
Request avec "database_connection"
$conn = $this->container->get('database_connection');
$chiens = $conn->fetchAll("
SELECT *, c.id AS idc FROM Chiens c
LEFT JOIN Images i ON c.id = i.chien_id
WHERE c.chiot = $chiot
&& c.race = $race
GROUP BY i.chien_id
ORDER BY c.nom ASC
");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment