statistics_title_list

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 statistics_title_list($dbfield, $dbrows)

Returns all time or today top or last viewed node(s).

Übergabeparameter

$dbfield one of

  • 'totalcount': top viewed content of all time.
  • 'daycount': top viewed content for today.
  • 'timestamp': last viewed node.

$dbrows number of rows to be returned.

Rückgabewert

A query result containing n.nid, n.title, u.uid, u.name of the selected node(s) or FALSE if the query could not be executed correctly.

Code

modules/statistics/statistics.module, line 210

<?php
function statistics_title_list($dbfield, $dbrows) {
  if (in_array($dbfield, array('totalcount', 'daycount', 'timestamp'))) {
    return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE s." . $dbfield . " != 0 AND n.status = 1 ORDER BY s." . $dbfield . " DESC"), 0, $dbrows);
  }
  return FALSE;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen