blob: 03af81109ceed8c9c50713c3729aedc05d5b44e3 (
plain) (
tree)
|
|
<?php
class Image
{
public static function deleteOwnedBy(string $userid): bool
{
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'];
}
}
|