took out sql_query's array and fixed bugs in item activity