Hello Sir,
Can you please tell me an easy method of how to delete a record.
I already read our tutorials about add a record and edit it and it works
superb.
I just need to know how to delete
Thank you
Can you please tell me an easy method of how to delete a record.
I already read our tutorials about add a record and edit it and it works
superb.
I just need to know how to delete
Thank you
Hi mhmdmed,
Is this from a listing? Normally I just add a little PHP to a form to check if there is a delete parameter in the URL and then add the MYSQL to delete the identified record. It should be something like:
Bob
Is this from a listing? Normally I just add a little PHP to a form to check if there is a delete parameter in the URL and then add the MYSQL to delete the identified record. It should be something like:
<?php
if ( $form->data['task'] == 'delete') {
$db =& JFactory::getDBO();
$query = "
DELETE
FROM `#__table_name`
WHERE `param` = 'value' ;
";
$db->setQuery($query);
$data = $db->query();
}
?>
Bob
Bob- how would you set the delete parm on the URL in this case. For example, I have a regular edit URL : index.php/home/data-selector-test.html?chronoform=professional-team-data-edit&token=93
so how would I build the PHP code onto the record edit form to delete. I get the delete from table portion, but not the linking it into the form
so how would I build the PHP code onto the record edit form to delete. I get the delete from table portion, but not the linking it into the form
This topic is locked and no more replies can be posted.