I would like to ask assistance to help me solve my coding problem, I would like to obtain information from two tables in the same database.
DB structure:
Table Name: _net
id
name
ip
comment
I can get all relevant details from this table with the following code:
$netsql = 'SELECT * FROM _net ORDER BY id';
$qnet = $conn->query($netsql);
$qnet->setFetchMode(PDO::FETCH_ASSOC);
Table: _net_port (other information I require to do a query)
id
netid
port
comment
I would like to obtain the information from table _net_port where the relevant id = to netid (id in Table _net will be the same as netid in Table _net_port. Especially to obtain the list of ports.