<?php
class Portfolio
{
	function portfolio_items()
	{
	$sql = "SELECT * FROM portfolio ORDER BY work_id DESC";
	$query = mysql_query($sql);
	while ($row = mysql_fetch_array($query)) {
	$rows[] = $row;
	}
	return $rows;
	}
	
	function portfolio_categories()
	{
	$sql = "SELECT * FROM portfolio_categories ORDER BY category_id ASC";
	$query = mysql_query($sql);
	while ($row = mysql_fetch_array($query)) {
	$rows[] = $row;
	}
	return $rows;
	}
	
	function portfolio_items_number()
	{
	$sql = "SELECT work_id FROM portfolio";
	$query = mysql_query($sql);
	$number = mysql_num_rows($query);
	return $number;
	}

}
?>