How to delete row from table and from DB?

delete a single row from a database table in ChronoForms.

Overview

The issue occurs when a delete button is configured without a specific parameter to identify the individual record, causing all rows matching a condition to be deleted.
Configure a task button view with a URL parameter that uniquely identifies each row, such as the record ID, and then set the delete conditions in the delete event to use that parameter.

Answered
Connectivity v6
Tw Twickbot 18 Jun, 2017
Hi,
I have a table with data from DB.
How can I delete rows from table and DB?

In "Views" => "Table" => "Columns list" I insert this:
_DELETE_:Delete

Now I have column "Delete" in table but it's empty.
What have I done wrong?

Thank you in advance for your response.
Tw Twickbot 18 Jun, 2017
All rows in table already is loaded from DB.
Max_admin Max_admin 18 Jun, 2017
Hi Twickbot,

You need to setup a delete event for this and add a delete button view and point it to that event.

Let me know if you can not get it done and I will try to prepare a tutorial.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Tw Twickbot 19 Jun, 2017
I setup delete event.
Add a delete button view and point it to that event.

Work fine but this button delete ALL rows in table (by condition).

How can I select and delete ONE row only?
Max_admin Max_admin 20 Jun, 2017
Hi Twickbot,

You need to configure the "Delete conditions" in the delete function, the button link must contain a parameter to identify the record and then you can use this parameter in the delete conditions box, please let me know if you can not get it done and I will prepare a tutorial.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Tw Twickbot 20 Jun, 2017
>>...the button link must contain a parameter to identify the record...

Yes I understant.
But what kind of parameter should this be?

And how can I insert column in table:
- checkbox in every row with a parameter to identify the record
or
- link (or button) "Delete" in every row with this parameter

How can I do it?
Max_admin Max_admin 20 Jun, 2017
Answer
Hi Twickbot,

Using a view of type task button, and in the url setting of the button you need to have something like this:
id={var:repeater_name.row.model.field}


Then in the delete conditions you can use:
field:{data:id}

Did you read the Connectivity 6 tutorial available in the FAQs section ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Tw Twickbot 22 Jun, 2017
Thank you very much for your help.
Works great now.

Hi Twickbot,
Did you read the Connectivity 6 tutorial available in the FAQs section ?



I read, but did not understand that paragraphs 5 and 6 are relevant to my case.
Max_admin Max_admin 22 Jun, 2017
Hi Twickbot,

I'm preparing a full manual and hopefully it will be ready by the end of the month.

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.