I’m having some problems in getting the correct query for my needs
SELECT tbl_participants.name,
tbl_transactions.consumer_rfid,
tbl_transactions.trans_price
FROM tbl_participants,
tbl_transactions
WHERE tbl_participants.id = tbl_transactions.trader_id
What I have is 2 simple table: one stored the participants (traders/consumers) the other one the transactions (form trader to consumer). I’m trying to bring back the following information: trader’s name, consumer’s name and price of transaction
tbl_participants has id(unique), name (of participant)
tbl_transactions has trader_id(taken from above table), consumer rfid(taken from above table)
my query should return the trader’s name (based on id), consumer’s name (based on rfid) and value of transaction
Thank you
Just a semi-wild guess from reading the comments:
I can’t make up what you mean by
name | consumer name | price…EDIT: After some more information, this is what I came up with: