Delete linked data

webcrea 22 Jun, 2017
Hi,

I try to delete a data in a table and his dependances in other table.

Alone the data is delete correctly

If i add a model with

Model name : vl
Related to ; fonds_id
Foreing key : id

When i try to delete I have

1109 Unknown table 'vl' in MULTI DELETE

an idea?
Thanks
Max_admin 22 Jun, 2017
Hi Christophe,

The other model name is "fonds_id" ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
webcrea 22 Jun, 2017
Hi Max,

No it's fcpi, i change it

now i have

1052 Column 'id' in where clause is ambiguous

there is an id in twice table

thanks
Max_admin 22 Jun, 2017
Hi Christophe,

And what are the delete conditions ? do you have the model name used in the delete conditions or not ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
webcrea 23 Jun, 2017
Hi Max,

in the first model

model : fcpi
delete conditions: fcpi.id:{data:item_id}

in the second model

model name : vl
related to: fcpi
foreign key: id
relations conditions: vl.fonds_id={data:item_id}

Now, there is no error the fonds is deleted but not the vl related

thanks for your help
regards
Max_admin 23 Jun, 2017
Hi Christophe,

Why do you need to use "relation conditions" ? the foreign key is not enough ? how the 2 tables are connected ?

You also should not use the request parameter item_id as its being used by Joomla.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
webcrea 24 Jun, 2017
Hi Max

Without "relation conditions" the fonds is delete but not the vl

The table fonds_vl is linked to fonds via a column fonds_id

I replace item_id by fonds_id : always fonds deleted but not the vl linked
(it's Item_id used by joomla)

Regards
Max_admin 13 Aug, 2017
Hi Christophe,

Very late reply, what was the relation type here ?

If the tables are not connected using the primary key of the main table then it will not work.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
webcrea 15 Aug, 2017
Hello Max,

The link under the bouton works well if i copy/paste in another window.

It seams it's the ajax call doesn't work. the weel turn infinite

in f12 the reponse is
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /arobas2017/index.php
on this server.</p>
</body></html>

the ip use is the server ip not mine!!!

regards
Max_admin 19 Aug, 2017
Hi Christophe,

This is a permissions issue or a server setup issue, not related to Connectivity, you can ask your host admin about this.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger