INSERT INTO counter (`id`, `page_id`, `type`, `user_ip`, `long_ip`, `count`)
VALUES(NULL, :page_id, :type, :user_ip, :long_ip, 1)
ON DUPLICATE KEY UPDATE `count` = `count` + 1
$var = explode('.', $image_name);
$type = end($var);
$account = $_GET['params']['account'];
delete from tableName where someParam = someValue
это влияет на потребление памяти или неважно?не важно.