summaryrefslogtreecommitdiffstats
path: root/inc/image.inc.php
blob: 1ce95da1cf5e8ce880d2d9c5bfa2809f77016869 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

class Image
{

	public static function deleteOwnedBy(string $userid): false
	{
		if ($userid === false || !is_numeric($userid))
			return false;
		//return Database::exec('DELETE FROM image WHERE ownerid = :userid', array('userid' => $userid));
		// TODO
		return false;
	}
	
	public static function getImageCount(string $login): int
	{
		$ret = Database::queryFirst('SELECT Count(*) AS cnt FROM imagebase '
			. ' WHERE imagebase.ownerid = :userid', array('userid' => $login));
		if ($ret === false)
			return 0;
		return (int)$ret['cnt'];
	}

}