Skip to content

Instantly share code, notes, and snippets.

@OliverUv
Created August 1, 2012 23:52
Show Gist options
  • Save OliverUv/3231656 to your computer and use it in GitHub Desktop.
Save OliverUv/3231656 to your computer and use it in GitHub Desktop.
$canEdit = $db->getResult(
'SELECT "textlabel"."id" AS "tid"
FROM "textlabel" INNER JOIN "project"
ON "project"."id" = "textlabel"."project_id" INNER JOIN "project_user"
ON "project"."id" = "project_user"."project_id"
WHERE "textlabel"."id" = '.$tid.' AND
"project_user"."user_id" = '.$uid.' AND
"project_user"."project_id" = '.$pid );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment