<?php

function insert_admin_channelid_to_categoryname($a)
{
    global $config,$conn;
	$query = "select name from categories_channels WHERE CATID='".mysql_real_escape_string($a[CID])."' limit 1"; 
	$results = $conn->execute($query);
	$returnthis=$results->fields[name];
	echo $returnthis;
}

function insert_admin_videoid_to_categoryname($a)
{
    global $config,$conn;
	$query = "select name from categories_videos WHERE CATID='".mysql_real_escape_string($a[VIDEOID])."' limit 1"; 
	$results = $conn->execute($query);
	$returnthis=$results->fields[name];
	echo $returnthis;
}

function insert_get_all_videos()
{
    global $config,$conn;
	$query = "select * from videos where active='1' AND public='1' order by VIDEOID desc"; 
	$results = $conn->execute($query);
	$returnthis = $results->getrows();
	return $returnthis;
}

?>