Skip to content

Instantly share code, notes, and snippets.

@sillypog
Last active December 2, 2016 20:40
Show Gist options
  • Save sillypog/a153755dd14566c0011d01aa9e49f6bf to your computer and use it in GitHub Desktop.
Save sillypog/a153755dd14566c0011d01aa9e49f6bf to your computer and use it in GitHub Desktop.
Portmeirion.IdentifyController SQL
SELECT warehouse_id
FROM users as u
FULL JOIN devices AS d ON d.user_id = u.id
WHERE login_id = ? OR device_id = ? OR prism_id = ?
ORDER BY u.login_id, d.device_id, u.prism_id
LIMIT 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment