A previous employee at my office constructed a php script that uses curly braces in the a SQL query. I understand that it would normally work for things like encapsulating array variables, but this query doesn't have any PHP variables in the string. Can someone clarify what the table being generated in the FROM
section of the query is actually requiring the curly braces for, and what the OJ stands for?
SELECT
DISTINCT ra.folder_id,
pd.id,
f.name,
pd.descriptor_text
FROM
{
OJ permission_descriptors pd
LEFT JOIN permission_descriptor_users pdu
ON pdu.descriptor_id = pd.id
}
role_allocations ra,
folders f
WHERE
pdu.descriptor_id IS NULL AND
pd.id = ra.permission_descriptor_id AND
pd.id != 1
ra.folder_id = f.id
ORDER BY
ra.folder_id