Hi Abu.
I have two related tables to create a grid.
When I delete a record in the grid, only the record of one of the tables is deleted.
How to also delete the related record in the other table?
Thanks for your help.
This is the relationship
$g->select_command = "SELECT * FROM ( SELECT
r.id,
r.nombre,
r.apellidos,
LEFT(CONCAT(r.nombre, ' ', r.apellidos),20) as nombre_t,
SUBSTRING($campo_semana,2,21) as semana,
r.sala,
c.sala_comida,
regimen,
if((r.regimen = 0 OR r.regimen =''),'', r.regimen) AS regimen_final,
r.registro
FROM residentes r
INNER JOIN comidas c
ON c.sala_comida = r.sala
I delete the record of the "residents" table, but not delete the corresponding record in the table "comidas"
Your Answer