当前位置: 首页>>代码示例>>PHP>>正文


PHP Period::truncate方法代码示例

本文整理汇总了PHP中Period::truncate方法的典型用法代码示例。如果您正苦于以下问题:PHP Period::truncate方法的具体用法?PHP Period::truncate怎么用?PHP Period::truncate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Period的用法示例。


在下文中一共展示了Period::truncate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: list_import_prepare

function list_import_prepare()
{
    $CI =& get_instance();
    $periods = new Period();
    $periods->truncate();
    echo 'LIST periods table truncated ...' . "\n";
    $courses = new Course();
    $courses->truncate();
    echo 'LIST courses table truncated ...' . "\n";
    $groups = new Group();
    $groups->truncate();
    echo 'LIST groups table truncated ...' . "\n";
    $rooms = new Room();
    $rooms->truncate();
    echo 'LIST rooms table truncated ...' . "\n";
    $participants = new Participant();
    $participants->truncate();
    echo 'LIST participants table truncated ...' . "\n";
    $CI->db->simple_query('TRUNCATE TABLE `course_task_set_type_rel`');
    echo 'LIST course_task_set_type_rel table truncated ...' . "\n";
    $categories = new Category();
    $categories->truncate();
    echo 'LIST categories table truncated ...' . "\n";
    $tasks = new Task();
    $tasks->truncate();
    $CI->lang->delete_overlays('tasks');
    unlink_recursive('private/uploads/task_files/', FALSE);
    unlink_recursive('private/uploads/unit_tests/', FALSE);
    echo 'LIST tasks table truncated ...' . "\n";
    $CI->db->simple_query('TRUNCATE TABLE `task_category_rel`');
    echo 'LIST task_category_rel table truncated ...' . "\n";
    $task_set_types = new Task_set_type();
    $task_set_types->truncate();
    echo 'LIST task_set_types table truncated ...' . "\n";
    $task_sets = new Task_set();
    $task_sets->truncate();
    $CI->lang->delete_overlays('task_sets');
    echo 'LIST task_sets table truncated ...' . "\n";
    $comments = new Comment();
    $comments->truncate();
    echo 'LIST comments table truncated ...' . "\n";
    $solutions = new Solution();
    $solutions->truncate();
    unlink_recursive('private/uploads/solutions/', FALSE);
    echo 'LIST solutions table truncated ...' . "\n";
    $CI->db->simple_query('TRUNCATE TABLE `task_task_set_rel`');
    echo 'LIST task_task_set_rel table truncated ...' . "\n";
}
开发者ID:andrejjursa,项目名称:list-lms,代码行数:48,代码来源:lamsfet_helper.php


注:本文中的Period::truncate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。