summaryrefslogtreecommitdiff
path: root/includes/sys_counter.php
blob: 40110165d092e04da6a26dc2c78d3e16b22c9bab (plain)
1
2
3
4
5
6
7
8
9
10
11
<?php

function counter() {
  global $p;

  if (sql_num_query("SELECT `Anz` FROM `Counter` WHERE `URL`='" . sql_escape($p) . "'") == 0)
    sql_query("INSERT INTO `Counter` ( `URL` , `Anz` ) VALUES ('" . sql_escape($p) . "', '1');");
  else
    sql_query("UPDATE `Counter` SET `Anz` = `Anz` + 1 WHERE `URL` = '" . sql_escape($p) . "' LIMIT 1 ;");
}
?>