Good afternoon!
Home
I have two tables: 1st questionnaire and 2nd response , and question_id is the key that allows you to interconnect the two tables, foreign key
in table "answer" of the "questionnaire" table.
Home
When I enter a record, I can not delete the record first from the "questionnaire" table, but first from the "comment" table.
Home
As I developed a page the administrator can see all the results of the database, and manipulate them. One of the options is to delete the results, but I'm not able to a query
to delete the last ID from your tables ...
The ID I get by the URL:
$resposta_id = $_GET['resposta_id'];
Home
but only the ID of the response " $resposta_id
", in query
I thought I would somehow get the last ID of the "questionnaire" table in a decreasing way, but I could not form a query
only with all that, and for the junction of the tables I had made:
select * from questionario left join resposta on questionario.pergunta_id=resposta.pergunta_id
If someone has an idea how to do it, or even another way, thank you!