Skip to content

Instantly share code, notes, and snippets.

@hungerburg
Last active May 31, 2020 10:17
Show Gist options
  • Save hungerburg/e149e8aa25d7d31a752dbc7445d6ad9e to your computer and use it in GitHub Desktop.
Save hungerburg/e149e8aa25d7d31a752dbc7445d6ad9e to your computer and use it in GitHub Desktop.

Random Musings

Drupal access daily top hits statistics in SQL

SELECT node_field_data.title AS Title,
      node_field_data.type AS Type,
      node_counter.daycount AS Today,
      node_counter.totalcount AS Alltime,
      DATE_FORMAT(FROM_UNIXTIME(node_counter.timestamp), '%y-%m-%d %T') AS Latest,
      DATE_FORMAT(FROM_UNIXTIME(node_field_data.created), '%y-%m-%d') AS Created
FROM node_field_data
INNER JOIN node_counter
ON node_field_data.nid=node_counter.nid
WHERE node_field_data.changed > UNIX_TIMESTAMP(DATE '2019-12-31')
ORDER BY Today DESC, Latest DESC

"Windows couldn't connect to the printer"

In case you see Windows Error 0x00000709 when trying to connect a networked printer, check that this key exists:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Providers\LanMan Print Services]

(Its Windows File and Print Sharing, can be installed from Network Card settings.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment