where('file_id', $file_id) ->count(); } public function getOwnersOfFile($file_id) { // /api/rpc/user/owner/getownersoffile/id return DB::table('str_owners') ->join('str_file', 'str_owners.file_id', '=', 'str_file.id') ->join('for_users', 'str_owners.user_id', '=', 'for_users.id') ->where('file_id', $file_id) ->get(array( "user_id", "title", "version", "views", "downloads", "submit_date", "last_date", "username", "avatar", "perm_id", "gender", "display_name", "name_colour", )); } public function countFilesOfOwner($user_id) { // /api/rpc/user/owner/countfilesofowner/id return DB::table('str_owners') ->where('user_id', $user_id) ->count(); } public function getFilesOfOwner($user_id) { // /api/rpc/user/owner/getfilesofowner/id return DB::table('str_owners') ->join('str_file', 'str_owners.file_id', '=', 'str_file.id') ->join('for_users', 'str_owners.user_id', '=', 'for_users.id') ->where('user_id', $user_id) ->get(array( "user_id", "title", "version", "views", "downloads", "submit_date", "last_date", "username", "avatar", "perm_id", "gender", "display_name", "name_colour", )); } }