I have a program to print a delivery note, it reads a table tblDeliveryDate by input delivery_id, then it reads the matching delivery_id from tblOrdersReferral which has multiple entries for quantity and stock_group, I save these in an array quantity and stock_group
It takes referral_id to access table tblReferralDetails to get the client_number in order to access table tblClient for the delivery name and address.
I had all this working, but as well as the quantity and stock_group I need the stock description from tblStockDescriptions
The keys to this table are in the array stock_group and I have become stuck trying to get them.
The code is attached.
I have tried following suggestions picked up by googling but I'm just getting more confused.
I want quantity [0,1,2,3] and stock_group [0,1,2,3] with stock_description[0,1,2,3]
obtained from tblStockDescriptions with reference to the matching stock_group