<?php
require_once 'db.php';
require_once 'config.php';
// we need to include these
$newsdata = DataAccess::fetch("
SELECT shortstory, story, timestamp, author FROM news30_story
");
print_r($newsdata);
?>
<?php
require_once 'db.php';
require_once 'config.php';
// we need to include these
$newsdata = DataAccess::fetch("
SELECT shortstory, story, timestamp, news30_users.user AS author_name FROM news30_story
INNER JOIN news30_users ON news30_story.author = news30_users.uid");
print_r($newsdata);
?>
<?php
require_once 'db.php';
require_once 'config.php';
// we need to include these
$newsdata = DataAccess::fetch("
SELECT story, timestamp, news30_users.user AS author_name, news30_access.name AS access_name FROM news30_story
INNER JOIN news30_users ON news30_story.author = news30_users.uid
INNER JOIN news30_access ON news30_users.access = news30_access.uid
");
print_r($newsdata);
?>