Created
July 1, 2012 13:21
-
-
Save OliverUv/3028413 to your computer and use it in GitHub Desktop.
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
$query = " | |
SELECT | |
tn.id AS id, | |
tn.skeleton_id AS skeleton_id, | |
(tn.location).x as x, | |
(tn.location).y as y, | |
(tn.location).z AS z, | |
greatest(tn.creation_time, tn.edition_time) AS most_recent, | |
'treenode' as type | |
FROM | |
treenode tn | |
WHERE | |
tn.project_id = $pid AND | |
tn.skeleton_id = $skid AND | |
tn.user_id = $uid | |
ORDER BY most_recent DESC | |
LIMIT 1"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment