Hi all I hope someone can help, I may be over looking something but have searched every where for a solution.
I have a very simple form (editable grid view).
the select is this for the grid on one field only
SELECT id_warehouse, name FROM ps_warehouse
my question I want the ‘add new’ row to not use the same select as above. ( the reason is i want to filter out so the user cannot add the same warehouse id for a product)
I would like it to use this instead
SELECT id_warehouse, name FROM ps_warehouse WHERE id_warehouse NOT IN (SELECT id_warehouse FROM ps_stock WHERE id_product=id_product)
can this be achieved ?
it looks like that data is there before I can make changes.