<?PHP
class language_SQL extends SqlRequest{

	var $table = 'language';

	function language($add_sql = '', $execute = false){

		$this->LINE = __FILE__.' '.__LINE__;
		return $this->Select(
			"SELECT * FROM language  ".
		$add_sql,
		$execute
		);
	}

	function language_group($language = '', $add_sql = '', $execute = false){

		$this->LINE = __FILE__.' '.__LINE__;
		return $this->Select(
			"SELECT p1. * , GROUP_CONCAT( CONCAT( p2.id, '=', p2.language, '=', p2.value ) , ';' ) AS value_group FROM `language` AS p1
			LEFT JOIN language AS p2 ON p2.name = p1.name AND p2.language != p1.language
			WHERE p1.language = '".$language."' ".($add_sql ? " AND ".$add_sql." " : "").
			"GROUP BY name, model ".
			"ORDER BY model, page ",
		$execute
		);
	}
}
?>