summaryrefslogblamecommitdiffstats
path: root/inc/image.inc.php
blob: 1bad04f7d3bc19effd4b6a96b21f73356cc55d1c (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                              

                                                                                                                 
         


                                                    

                                                                                           



                                   


 
<?php

class Image
{

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

}