I have a problem that I can’t solve:
In the database I have two tables, one to list “travel” and the other to list “tickets”
I have generate a table on a PHP page that through a query lists all the available travel (IDtravel) with all the fields, including a numerical field of the available places
In the Tickets Table (IDticket) there are all data including the number of seats booked (for each travel)
I would like to insert a column in the table with the data of the booked places relating to the IDtravel record, taking from the Tickets table by adding the result (SUM)
I tried to configure various query solutions, but it doesn’t work
I don’t know if I explained enough, but if someone has any ideas, thank you in advance