Open webian opened 1 week ago
It is not supported to have products in more than one FE user group. fe_group can only be either 3 or 2.
Maybe the code could be enhanced like here
No Table No Function No Loop
Building on the idea of parsing your list into a table our DBA suggested using XML.
Declare @Ids varchar(50)
Set @Ids = ‘1,2,3,5,4,6,7,98,234’
DECLARE @XML XML
SET @XML = CAST('<i>' + REPLACE(@Ids, ',', '</i><i>') + '</i>' AS XML)
SELECT *
FROM
SomeTable
INNER JOIN @XML.nodes('i') x(i)
ON SomeTable .Id = x.i.value('.', 'VARCHAR(MAX)')
This line https://github.com/franzholz/table/blob/bd46cb51c1c029a6b49742b2722b19f525d9434b/lib/class.tx_table_db.php#L792 only considers the first element of fe_group field.
Example 1: if fe_group = '2,3', the record is shown only to users in group 2 and not to users in group 3. Example 2: if fe_group = '3,2', the record is shown only to users in group 3 and not to users in group 2.