File "sql_test.php"

Full Path: /home/analogde/www/download/CHESS_2022/sql_test.php
File size: 462 bytes
MIME-type: text/x-php
Charset: utf-8

<?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/>';
		 }
?>