<?php

	include('database.php');
	DB_connexion(); 

	$J1 = "dddd";
	$J2 = $J1;
	
	$sql = "(SELECT * from partie where joueur1='$J1' ) union (SELECT * from partie where joueur2='$J2')";
	$retour = mysql_query($sql);
	
	$number = mysql_num_rows($retour);

	echo $sql;
	
	echo '<br/>';
	echo '<br/>';
	echo '<br/>';
	echo '<br/>';
	echo '<br/>';
	
	echo $number;
	
	
	while($data=mysql_fetch_assoc($retour)) 
		 {	
			echo $data['joueur1'];
			echo '<br/>';
		 }
?>