dans cette boucle je veux extraire d'un tableau le contenu du champs "grids_1" en fonction de la requete precedente.
par la suite je voudrais faire un array_diff entre cette valeur et une autre.
pour le moment ce qui me preoccupe est que ma boucle me sort X fois le meme contenu du champs grids_1.
est ce que vous voyez qq chose qui cloche dans cette boucle svp?
$query = ("SELECT date FROM grids_winning ORDER BY id_grids DESC LIMIT 1,1");
$result = mysql_query($query) or die('Invalid query: ' . mysql_error());
//store it into an array
// this will be useful in order to compare ONLY new grids for the current draw and diregards PREVIOUS grids
$dateprev = mysql_fetch_assoc($result);
$dateprevious = implode('',$dateprev);
//current date
$datecurrent = time();
//select the grids played after last draw only
$query = ("SELECT * FROM grids_clients WHERE timeplayed BETWEEN $dateprevious AND $datecurrent");
$result = mysql_query($query) or die('Invalid query: ' . mysql_error());
$counter = mysql_num_rows($result);
//load the variable with the array. fetch the array from query
$return = mysql_fetch_assoc($result);
//loop: load $data with one field of the array (will be used for comparaison with winning numbers)
for ($i = 0; $i < $counter; $i++)
{
$data[$i] = $return['grids_1'];
print_r($data[$i]);
}