Created
April 20, 2012 12:11
-
-
Save Tocacar/2428131 to your computer and use it in GitHub Desktop.
Another query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this is giving me an array of project_licence id numbers | |
public function getAssignedProjectLicenceIds() { | |
$user_id = $this->getId(); | |
$connection = Doctrine_Manager::connection(); | |
$query = 'SELECT | |
p.id as ids | |
FROM | |
project_licence p | |
INNER JOIN | |
lab l | |
ON | |
p.lab_id = l.id | |
RIGHT OUTER JOIN | |
lab_user lu | |
ON | |
lu.lab_id = l.id | |
WHERE | |
lu.user_id = ' . $user_id; | |
$statement = $connection->execute($query); | |
$statement->execute(); | |
$resultset = $statement->fetchAll(PDO::FETCH_COLUMN, 0); | |
return $resultset; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment