I have 3 tables: clients, john1_proofs, and prices. clients and john1_proofs have a column in common, and john1_proofs and prices have a column in common.
I keep getting this error:
This makes no sense because the column is called "proof_name" and john004 is one of the inputs for a particular row. So if I click on the "john005" thumbnail, I get the same message but with 'john005' in the message.Could not execute the query: Unknown column 'john004' in 'where clause'
Here's the query I've got:
Code: Select all
$query = 'SELECT john1_proofs.proof_name, john1_proofs.session_date, john1_proofs.image_name, clients.client_name, prices.8wallets, prices.5x7, prices.8x10, prices.11x14, prices.16x20, prices.20x24, prices.20x30, prices.11x14can, prices.16x20can, prices.20x30can FROM john1_proofs INNER JOIN clients ON john1_proofs.client_code = clients.client_code LEFT JOIN prices ON john1_proofs.prints = prices.prints WHERE john1_proofs.proof_name = ' . $id;Code: Select all
$query = 'SELECT john1_proofs.proof_name, john1_proofs.session_date, john1_proofs.image_name, clients.client_name, prices.8wallets, prices.5x7, prices.8x10, prices.11x14, prices.16x20, prices.20x24, prices.20x30, prices.11x14can, prices.16x20can, prices.20x30can FROM john1_proofs, clients, prices WHERE john1_proofs.client_code = clients.client_code AND john1_proofs.prints = prices.prints AND john1_proofs.proof_name = ' . $id;Thanks a bunch!
Jen