I want to delete all data in one channel. And I found that, the best way to delete all entry in channel is delete this channel and re-create it follow this article: What is the best way to delete every entry in a channel?
and I tried to delete channel follow this article: http://ellislab.com/expressionengine/user-guide/development/api/api_channel_structure.html
I know that the site_id is 1 and the channel_id of channel I need to delete is 1. But when I tried these code:
ee()->load->library('api'); ee()->api->instantiate('channel_structure'); $channel_id = 1;$site_id = 1; ee()->api_channel_structure->delete_channel((int) $channel_id, [(int) $site_id]);
I got this error:
Parse error: syntax error, unexpected T_STRING in /var/www/vhosts/au/admin/expressionengine/libraries/Functions.php(679) : eval()'d code on line 7
I tried with:
ee()->api_channel_structure->delete_channel((int) 1, [(int) 1]); ee()->api_channel_structure->delete_channel(1, 1);
But got same issue.
Does somebody know how to solve this issue. Thank so much!