Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Commit

Permalink
remove databasenames
Browse files Browse the repository at this point in the history
  • Loading branch information
Letty committed Dec 18, 2017
1 parent f696fa1 commit 6cd29b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion queryhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_topics_for_person(person_id, connection):

with connection.cursor() as cursor:
sql = 'select a.t_id id, tc.keyword, a.count from dnb_author_topic a '\
'inner join dnb2.dnb_topic_count tc on a.t_id= tc.id '\
'inner join dnb_topic_count tc on a.t_id= tc.id '\
'where a.a_id=%s order by count desc limit 20'
try:
cursor.execute(sql, (person_id))
Expand Down
4 changes: 2 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def open_db_connection():
connection = pymysql.connect(host='127.0.0.1',
user='root',
password='',
db='dnb2',
db='dnb',
charset='utf8mb4',
cursorclass=pymysql.cursors.DictCursor)
return connection
Expand Down Expand Up @@ -771,7 +771,7 @@ def get_topic_network_filter_year_person():
r = {'source': t[0]['id'], 'target': t[1]['id'], 'strength': 0}

sql = 'select count(it1.i_id) count from dnb_item_topic it1, '\
'dnb_item_topic it2, dnb2.dnb_author_item ai where '\
'dnb_item_topic it2, dnb_author_item ai where '\
'it1.t_id = %s and it2.t_id = %s and it1.year >=%s and it1.year <= %s '\
'and ai.a_id = %s and ai.i_id = it1.i_id and it1.i_id = it2.i_id'
cursor.execute(sql, (t[0]['id'], t[1]['id'], params['min_year'],
Expand Down

0 comments on commit 6cd29b5

Please sign in to comment.