-1
I’m a beginner in this world and I have a question.
How do I access only a single row of an SQL table by ID?
I have a "company" table that has a foreign key with the id of another table: table "orders". That is, in the system each company has its due requests.
When the site’s Adm accesses your page, it has access to those companies and the orders that were placed by them.
How do I, when Adm enters the system and click on the page of a specific company, only the orders of that company that was accessed appear? How do I add/access data from a single row only in the Mysql table by id??
I am grateful!
It wouldn’t be enough to do
SELECT ... FROM pedidos WHERE id_empresa = 1
(replacing 1 with the id in question)?– Woss