@@ -270,7 +270,7 @@ elif what_i_do == '11':
except:
pass
elif what_i_do == '12':
- curs.execute(db_change("select count(title) from data"))
+ curs.execute(db_change("select count(*) from data"))
count_data = curs.fetchall()
if count_data:
count_data = count_data[0][0]
@@ -31,7 +31,7 @@ def list_title_index_2(conn):
curs.execute(db_change('select data from other where name = "count_all_title"'))
if int(curs.fetchall()[0][0]) < 30000:
count = curs.fetchall()
if count:
count_end += [count[0][0]]
@@ -40,7 +40,7 @@ def list_title_index_2(conn):
sql_list = ['category:', 'user:', 'file:']
for sql in sql_list:
- curs.execute(db_change("select count(title) from data where title like ?"), [sql + '%'])
+ curs.execute(db_change("select count(*) from data where title like ?"), [sql + '%'])
@@ -103,9 +103,7 @@ def recent_changes_2(conn, name, tool):
curs.execute(db_change('' + \
'select id, title, date, ip, send, leng, hide from history ' + \
- plus_sql + \
- 'order by date desc ' + \
- 'limit ?, 50' + \
+ plus_sql + 'and date in (select date from history order by date desc limit ?, 50) order by date desc' + \
''), [sql_num])
div += '</tr>'
@@ -769,7 +769,7 @@ def custom():
user_admin = '0'
user_acl_list = '0'
- curs.execute(db_change("select count(name) from alarm where name = ?"), [ip])
+ curs.execute(db_change("select count(*) from alarm where name = ?"), [ip])
user_notice = str(count[0][0])
@@ -980,7 +980,7 @@ def acl_check(name = 'test', tool = '', topic_num = '1'):
if admin_check(num) == 1:
return 0
else:
- curs.execute(db_change("select count(title) from history where ip = ?"), [ip])
+ curs.execute(db_change("select count(*) from history where ip = ?"), [ip])
count = count[0][0] if count else 0
if count >= 50:
@@ -8,14 +8,14 @@ def user_count_edit_2(conn, name):
that = name
- curs.execute(db_change("select count(title) from history where ip = ?"), [that])
+ curs.execute(db_change("select count(*) from history where ip = ?"), [that])
data = count[0][0]
data = 0
- curs.execute(db_change("select count(code) from topic where ip = ?"), [that])
+ curs.execute(db_change("select count(*) from topic where ip = ?"), [that])
t_data = count[0][0]
@@ -5,7 +5,7 @@ def user_info_2(conn):
ip = ip_check()
if count and count[0][0] != 0:
plus2 = '<li><a id="not_thing" href="/alarm">' + load_lang('alarm') + ' (' + str(count[0][0]) + ')</a></li>'
@@ -8,7 +8,7 @@ def watch_list_name_2(conn, tool, name):
return redirect('/login')
if tool == 'watch_list':
- curs.execute(db_change("select count(title) from scan where user = ?"), [ip])
+ curs.execute(db_change("select count(*) from scan where user = ?"), [ip])
if count and count[0][0] > 9:
return re_error('/error/28')
@@ -1,6 +1,6 @@
{
"master" : {
- "r_ver" : "v3.1.9-master-10",
+ "r_ver" : "v3.1.9-master-11",
"c_ver" : "3190201",
"s_ver" : "8"
}, "stable" : {