Bulk Delete Default theme
Bulk Delete - Select multiple records and delete. You cannot delete the record with a key : EBGC57SXM-VW47I6AF-401X7DYM
HIDE CODE
<?php
$xcrud = Xcrud::get_instance();
$xcrud->table('million');
$xcrud->limit_list('20,50,100,1000'); // do not use 'all' for large tables
$xcrud->bulk_select_position('left'); //It can be 'left' or 'right'
//$xcrud->set_bulk_select(false);
$xcrud->set_bulk_select(false,'cd_key','=','EBGC57SXM-VW47I6AF-401X7DYM');//Dont be able to select records with ID 287846
$xcrud->unset_remove(true,'cd_key','=','EBGC57SXM-VW47I6AF-401X7DYM');
$xcrud->create_action('bulk_delete', 'bulk_delete'); // action callback, function publish_action() in functions.php
echo $xcrud->render();
?>
<button class="btn btn-primary" onclick="deleteItems();">Delete Selected</button>
<script>
function deleteItems(){
var r = confirm("Confirm deletion of " + items.length + " items.");
if (r == true) {
Xcrud.request('.xcrud-ajax',Xcrud.list_data('.xcrud-ajax',{action: 'bulk_delete', task:'action',selected:items,table:'million',identifier:'id'}))
items = [];
}
}
</script>
Fatal error: Uncaught mysqli_sql_exception: Table 'shpilkina.million' doesn't exist in D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud_db.php:61 Stack trace: #0 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud_db.php(61): mysqli->query('SHOW COLUMNS FR...', 1) #1 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud.php(4896): Xcrud_db->query('SHOW COLUMNS FR...') #2 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud.php(1992): Xcrud->_get_table_info() #3 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\demos\pages\bulk_delete.php(11): Xcrud->render() #4 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\demos\html\template.php(82): include('D:\\aaa_iVzuvi\\t...') #5 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\demos\index.php(31): include('D:\\aaa_iVzuvi\\t...') #6 {main} thrown in D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud_db.php on line 61