mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-10-01 19:13:23 -04:00
26 lines
601 B
PHP
26 lines
601 B
PHP
<?php
|
|
|
|
namespace Gazelle\API;
|
|
|
|
class Artist extends AbstractAPI {
|
|
public function run() {
|
|
if (!isset($_GET['artist_id'])) {
|
|
json_error('Missing artist id');
|
|
}
|
|
|
|
$this->db->prepared_query("
|
|
SELECT
|
|
ArtistID,
|
|
Name
|
|
FROM
|
|
artists_group
|
|
WHERE
|
|
ArtistID = ?", $_GET['artist_id']);
|
|
if (!$this->db->has_results()) {
|
|
json_error('Artist not found');
|
|
}
|
|
$artist = $this->db->next_record(MYSQLI_ASSOC, false);
|
|
return $artist;
|
|
}
|
|
}
|