Create script for session categories - refs BT#9088

1.10.x
Imanol Losada 10 years ago
parent b9668733c5
commit 6844f08cca
  1. 16
      tests/scripts/insert_sessions_categories.php

@ -0,0 +1,16 @@
<?php
/**
* This script generates four session categories.
*/
require_once '../../main/inc/global.inc.php';
api_protect_admin_script();
$categories = array(
'capacitación',
'programas',
'especializaciones',
'cursos prácticos'
);
$tableSessionCategory = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY);
foreach ($categories as $category) {
Database::query("INSERT INTO $tableSessionCategory (name) VALUES ('$category')");
}
Loading…
Cancel
Save