Hi,
My form is about books.
On each book form, selected readers will post appreciations on three aspects of the book.
Before appreciations are made available to others by the administrator, we want the reader to see only his own appreciations.
The following a query for the form would do the job for the book 124 read by the user 249 with the three evaluations (tables 74, 75, 76) on the three aspects of the book:
SELECT b.*, ev74.comment comment74, ev74.de de74, ev75.comment comment75, ev75.de de75, ev76.comment comment76, ev76.de de76
FROM fk__books b
LEFT JOIN fk__books_74_repeat ev74 ON ev74.parent_id = b.id AND ev74.de = 249
LEFT JOIN fk__books_75_repeat ev75 ON ev75.parent_id = b.id AND ev75.de = 249
LEFT JOIN fk__books_76_repeat ev76 ON ev76.parent_id = b.id AND ev76.de = 249
WHERE b.id=124
It will show the book's fields and the evaluations the reader has (or not) already given.
1) Is it possible to tell the form to use the above query instead of the built-in one?
The standard query is, I suppose,
SELECT b.*, ev74.comment comment74, ev74.de de74, ev75.comment comment75, ev75.de de75, ev76.comment comment76, ev76.de de76
FROM fk__books b
LEFT JOIN fk__books_74_repeat ev74 ON ev74.parent_id = b.id
LEFT JOIN fk__books_75_repeat ev75 ON ev75.parent_id = b.id
LEFT JOIN fk__books_76_repeat ev76 ON ev76.parent_id = b.id
WHERE b.id=124
This standard query will show also the evaluation of the other readers, which, at this stage, is not wanted.
We want to see only the user 249's evaluations.
2) Or is there a way to pre-filter the rows (on {$my->id}) in the menu Fabrik settings in order to show the reader only the rows he has (or will) set?
My form is about books.
On each book form, selected readers will post appreciations on three aspects of the book.
Before appreciations are made available to others by the administrator, we want the reader to see only his own appreciations.
The following a query for the form would do the job for the book 124 read by the user 249 with the three evaluations (tables 74, 75, 76) on the three aspects of the book:
SELECT b.*, ev74.comment comment74, ev74.de de74, ev75.comment comment75, ev75.de de75, ev76.comment comment76, ev76.de de76
FROM fk__books b
LEFT JOIN fk__books_74_repeat ev74 ON ev74.parent_id = b.id AND ev74.de = 249
LEFT JOIN fk__books_75_repeat ev75 ON ev75.parent_id = b.id AND ev75.de = 249
LEFT JOIN fk__books_76_repeat ev76 ON ev76.parent_id = b.id AND ev76.de = 249
WHERE b.id=124
It will show the book's fields and the evaluations the reader has (or not) already given.
1) Is it possible to tell the form to use the above query instead of the built-in one?
The standard query is, I suppose,
SELECT b.*, ev74.comment comment74, ev74.de de74, ev75.comment comment75, ev75.de de75, ev76.comment comment76, ev76.de de76
FROM fk__books b
LEFT JOIN fk__books_74_repeat ev74 ON ev74.parent_id = b.id
LEFT JOIN fk__books_75_repeat ev75 ON ev75.parent_id = b.id
LEFT JOIN fk__books_76_repeat ev76 ON ev76.parent_id = b.id
WHERE b.id=124
This standard query will show also the evaluation of the other readers, which, at this stage, is not wanted.
We want to see only the user 249's evaluations.
2) Or is there a way to pre-filter the rows (on {$my->id}) in the menu Fabrik settings in order to show the reader only the rows he has (or will) set?