# account_list_searches: list the searches of the user
# input: the user id
# output: resume of the searches
def account_list_searches(uid):
out =""
# first detect number of queries:
nb_queries_total = 0
nb_queries_distinct = 0
id_queries_distinct = []
res = run_sql("SELECT COUNT(*),COUNT(DISTINCT(id_query)) FROM user_query WHERE id_user=%s", (uid,), 1)
try:
nb_queries_total = res[0][0]
nb_queries_distinct = res[0][1]
except:
pass
out +=""" You have made %s queries.A <A href="../youralerts.py/display">detailed list</A> is available with a posibility to (a) view search results and (b) subscribe for automatic email alerting service for these queries