Mercurial > hg > extraction-interface
diff interface/add_missing_books_to_sections.php @ 2:da5309d54083
add missing books to sections as dummy entries for further modification.
(1) Alter "Auto_increment" to 5190896 for sections table in database.
(2) Finds missing books (using mysql OR _select_distinct() in add_missing_books_to_sections.php
(3) Put the missing_books.csv in intermediate_results.
and execute: add_missing_books_to_sections.php
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 23 Jan 2015 19:00:57 +0100 |
parents | |
children | 883ad980a43b |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/interface/add_missing_books_to_sections.php Fri Jan 23 19:00:57 2015 +0100 @@ -0,0 +1,34 @@ +<?php +include_once('Lib_mb_utf8.php'); +include_once('config.php'); +include_once('edit_section_db.php'); +set_time_limit(0); +ini_set('memory_limit', '-1'); + +$link_mysql = mysql_connect($mysql_server, $mysql_user, $mysql_password); +mysql_query("SET NAMES utf8"); + +if (!$link_mysql) { + die('Could not connect: ' . mysql_error()); +} + +$db_selected = mysql_select_db($mysql_database, $link_mysql); +if (!$db_selected) { + die ('Can\'t use foo : ' . mysql_error()); +} +?> + +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + <head + </head> + <body> + <?php + add_missing_books_to_sections(); + + ?> + </body> + + +</html> +