Index: ad.pages.inc
=========================================================
--- ad.pages.inc	(revision 1.1.2.6.2.3)
+++ ad.pages.inc	Sun Nov 29 18:31:29 CET 2009
@@ -259,7 +259,7 @@
       array('data' => t('Date'), 'field' => 'date', 'sort' => 'desc'),
       array('data' => t('Action'), 'field' => 'action'));
     if (isset($node->nid) && $node->nid > 0) {
-      $sql = "SELECT * FROM ad_statistics WHERE action NOT IN ('view', 'click') AND aid = %d";
+      $sql = "SELECT * FROM {ad_statistics} WHERE action NOT IN ('view', 'click') AND aid = %d";
       $sql .= tablesort_sql($header);
       $result = pager_query($sql, 25, 0, NULL, $node->nid);
       while ($ad = db_fetch_object($result)) {
