Mercurial > hg > extraction-interface
annotate interface/add_missing_books_to_sections.php @ 17:82f8c6bd2b69
add new tag will based on the current topic_id, insert new element into (1)taglist table and (2)topic_tag_relation table
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 20 Feb 2015 17:57:02 +0100 |
parents | 883ad980a43b |
children |
rev | line source |
---|---|
2
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
1 <?php |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
2 include_once('Lib_mb_utf8.php'); |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
3 include_once('config.php'); |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
4 include_once('edit_section_db.php'); |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
5 set_time_limit(0); |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
6 ini_set('memory_limit', '-1'); |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
7 |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
8 $link_mysql = mysql_connect($mysql_server, $mysql_user, $mysql_password); |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
9 mysql_query("SET NAMES utf8"); |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
10 |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
11 if (!$link_mysql) { |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
12 die('Could not connect: ' . mysql_error()); |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
13 } |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
14 |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
15 $db_selected = mysql_select_db($mysql_database, $link_mysql); |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
16 if (!$db_selected) { |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
17 die ('Can\'t use foo : ' . mysql_error()); |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
18 } |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
19 |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
20 |
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
21 |
4
883ad980a43b
add dynasty column to table books
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
2
diff
changeset
|
22 add_missing_books_to_sections(); |
883ad980a43b
add dynasty column to table books
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
2
diff
changeset
|
23 |
2
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
24 |
4
883ad980a43b
add dynasty column to table books
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
2
diff
changeset
|
25 |
883ad980a43b
add dynasty column to table books
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
2
diff
changeset
|
26 |