query($sqlDeveloper); $developer = $resultDeveloper->fetch_assoc(); // 确定页面标题和开发者名称 if ($developer) { $developerName = htmlspecialchars($developer['username']); $pageTitle = $developerName . ' 的应用 - ' . APP_STORE_NAME; } else { // 如果开发者ID为0或不存在,视为管理员 $developerName = '管理员'; $pageTitle = '管理员的应用 - ' . APP_STORE_NAME; } // 获取该开发者的所有应用 $sqlApps = "SELECT a.*, (SELECT AVG(rating) FROM reviews WHERE app_id = a.id) as avg_rating FROM apps a WHERE a.developer_id = $developerId"; $resultApps = $conn->query($sqlApps); ?>
...
prepare($tagSql); $tagStmt->bind_param('i', $app['id']); $tagStmt->execute(); $tagResult = $tagStmt->get_result(); $tags = []; while ($tag = $tagResult->fetch_assoc()) { $tags[] = htmlspecialchars($tag['name']); } $tagStmt->close(); // 获取应用适用平台 $platforms = json_decode($app['platforms'], true); echo '标签: '. implode(', ', $tags) . '
'; echo '平台: '. implode(', ', $platforms) . '
'; ?>评分: /5
查看详情