I am making a module for vBadvanced that selects the most viewed Thread
This is the sql query:

PHP Code:
$temas_query_view $db->query_read("SELECT * FROM " TABLE_PREFIX "thread 
...