How to delete all records from or empty a custom database table?

I would just modify Q Studio example to:

global $wpdb;
$table  = $wpdb->prefix . 'table_name';
$delete = $wpdb->query("TRUNCATE TABLE $table");

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)