- Impact
- 19
hey
i am not getting an error..it just doesnt show anything when it should
and then :
i am not getting an error..it just doesnt show anything when it should
PHP:
function loadMedia($limit,$cid=-1)
{
$media = array();
if ($cid == -1) {
$where = "WHERE `status` = 1"; }
$q = "SELECT * FROM `media` $where order by `timestamp` desc LIMIT 0,$limit";
$result = $this->query($q);
for ($b = 0; $b <(mysql_num_rows($result));$b++)
{
$db = mysql_fetch_array($result);
$media[$b] = array($db['id'],$db['cat_id'],$db['by_id'],$db['file_name'],$db['dp'],$db['title'],
$db['description'],$db['views'],$db['timestamp']);
}
return $media or die ("cant");;
}
PHP:
<?$media = $database->loadMedia(1); echo$media['0']['5'];?>









