Quote from: Everett at May 17, 2010, 05:25 PM
Can you check in phpMyAdmin etc. to see if that table actually does exist in your database?
I did not have the necessary table in my bd and i create it
manually.
now in manager / modules i have this:
seems to be working, but every time i have on screen "Please wait while MODx loads the page..."
P.S.
and when i try to get pagehits in front with this snippet:
<?php
$output = '';
//connect to table that stores site content
$table_content = $modx->getFullTableName("site_content");
$table_hits = $modx->getFullTableName("page_hit_counter");
$fields = 'id,pagetitle,page_count';
$sql= "SELECT {$fields} FROM {$table_content} table_content JOIN {$table_hits} table_hits ON table_hits.page_id = table_content.id WHERE table_content.donthit = '0' AND table_content.id NOT IN (0,1,2,40,3,8,16,17,18,23,24,25,26,27,46,34) ORDER BY table_hits.page_count DESC LIMIT 3";
$results= $modx->db->query($sql);
while ($row=$modx->db->getRow($results)) {
$output .= '<a href="index.php?id=' . $row[id] . '"/>' . $row[pagetitle] . '</a>' . "<br>" . 'Viewed: ' . $row[page_count] . ' times' . "<br>";
}
return $output;
?>
i have no results