Bug ?

aje

Member
I prefilter a product list with 2 filters. I need the admin to feed products to users and the users must be able to change values so i have a hidden product number wich is hidden for the user. I am solving this with a copy of the org list then turn of adding, editing and use the copy plugin and change owner on copy in user element.

First i prefilter on admin id and it works great. The copy works as expected. But i also need a prefilter to hide the already copied products.

prefilter 2

AND kataloghusvnr
NOT IN
SELECT fab_prislister.kataloghusvnr FROM fab_prislister WHERE fab_prislister.pl_user IN (SELECT brukere.brukerid_old FROM brukere WHERE brukere.firmanavn = (SELECT brukere.firmanavn FROM brukere WHERE brukere.brukerid_old = '{$my->id}'))

Now i dont get any products, if i change NOT IN to IN i get the product wich is already added.

Is it a bug in the NOT IN ?
 
Hello
Its really hard to say as I've no idea what that query is actually doing. Have you tried running it in phpmyadmin to ensure that its getting the right results? To me it seems odd that you say you want to filter on things which have already been copied, but the where statement is filtering on a user id, but as I said I really am not sure what the query is doing.
 
The query is returning all the products wich the users in one company already have in their list so i am trying to show all the product wich product they dont have in their list. when i try it in phpmyadmin i get two empty row and on house and that is correct. If i swap NOT IN with IN i get the opposite of the result i want.
 
I also tried this as the query prefilter :

Code:
select id from element_test where id = 2 or id = 4
and that hid records 2 and 4.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top