Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'config.php';
- startMySQLConnection();
- $sql = "SELECT n.id AS id,n.name AS name,n.summary AS summary,p.image AS image,n.creationDate AS creationDate
- FROM news n
- INNER JOIN leagues l ON n.leagueId=l.id
- INNER JOIN photos p ON n.leagueId=p.leagueId
- WHERE n.leagueId=" . $_REQUEST['leagueId'];
- $query = mysql_query($sql);
- while ($row = mysql_fetch_array($query)) {
- $row["image"] = prefixFullUrl($row, "image");
- $output[] = $row;
- }
- print json_encode($output);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement