Location: PHPKode > projects > paperasse > paperasse/mysql/table_traitements.php
<?php
# ---------------------------------------
# Paperasse (c) 2006 Guillaume BETTAYEB
# mail and documents management web page
# hide@address.com
# ---------------------------------------


switch ($requete){
	case 'unique':
	//requete unique
	$sql 			= "SELECT * FROM `traitements` WHERE `id`=$id";
	$query			= mysql_query($sql) OR die(mysql_error());
	$table_traitements	= mysql_fetch_array($query,MYSQL_ASSOC);
	break;
	case'partielle':
	//requete partielle
	$sql 	= "SELECT * FROM `traitements` ORDER BY `$order` LIMIT $a,$b";
	$query	= mysql_query($sql) OR die(mysql_error());
	while($array = mysql_fetch_array($query,MYSQL_ASSOC)){
		$id						= $array['id'];
		unset($array['id']);
		$table_traitements[$id] 	= $array;
	}
	break;
	case'complete':
	//requete complete
	$sql = "SELECT * FROM `traitements` ORDER BY `$order`";
	while($array = mysql_fetch_array($query,MYSQL_ASSOC)){
		$id						= $array['id'];
		unset($array['id']);
		$table_traitements[$id] 	= $array;
	}
	break;
}
?>
Return current item: paperasse