Skip to content

Instantly share code, notes, and snippets.

@Lonsdale201
Created November 10, 2024 11:47
Show Gist options
  • Save Lonsdale201/f56d52771bb1b8ed049c5ecd4c310d74 to your computer and use it in GitHub Desktop.
Save Lonsdale201/f56d52771bb1b8ed049c5ecd4c310d74 to your computer and use it in GitHub Desktop.
JetEngine - FluentBoards - SQL Query
// This SQl Query For the user who is logged in, it will retrieve all the Boards to which it is assigned.
// Create a new JetEngine Query, with the Query builder. Set the Query type to SQL/AI Query
// Turn on the Advanced/AI mode switcher
// in the SQL Query Area, paste the code
// In the Cast result to instance of object -- Keep stdClass
// You can use the results like jetformbuilder etc..
SELECT fbs_boards.*
FROM {prefix}fbs_boards AS fbs_boards
JOIN {prefix}fbs_relations AS relations ON fbs_boards.id = relations.object_id
WHERE relations.object_type = 'board_user'
AND relations.foreign_id = %current_user_id%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment