I created webservice for gallery as category.
Each image gallery should have count and main cover photo.
I need help creating the main photo from each gallery and I believe that is should last image should be main.
My webservice for image gallery category as below :
/* Get galleries*/
public function get_galleries($db) {
$operation = new Operations($db);
$galleries = $operation->GetResultsWebServiceGallery("Select galID as 'id', galTitle, galLocation,galDescription from " . $db . ".hotshoe_gallery");
foreach ($galleries as $key => $value) {
if(!empty($galleries[$key]['id'])) {
$id = $galleries[$key]['id'];
$galleries[$key]['count'] = $operation->GetResults("Select COUNT(*) as total from " . $db . ".hotshoe_images where galID=$id");
}
}
return $galleries;
}