for ( $i = 1; $i <= 7; $i++ ) {
echo 'loop' . $i;
}
$return = null;
for ( $i = 1; $i <= 7; $i++ ) {
$return .= 'loop' . $i;
}
return $return;
return include( FILE_PATH_HERE );
Please Log in to join the conversation.
Please Log in to join the conversation.
$utente= [user_id] ;
$date_test = Dates;
$url = ($_SERVER );
$result = mysql_query('select * from yourfitness_tornei');
while (($row = mysql_fetch_assoc($result))) {
$tournamentArray[$i]=[cb_tournament_name];
$surfArray[$i]=[cb_surface];
$repoArray[$i]=[cb_repos];
$scoreArray[$i]=[cb_scores];
Please Log in to join the conversation.
Please Log in to join the conversation.
Write the code to do just that. Your query would need to utilize order by and limit. Again, we're not here to assist with custom coding.the table inside the variable $tab is seen but the values taken is always the same I need to take the last seven recorded in the table you see in the code, how can I make it work?
Please Log in to join the conversation.
<html>
<body>
<?
$utente = 540;
$i=1;
$cont=0;
$m="";
$m1= array();
$myArray= array();
$p=0;
$dates="";
$tournament="";
$surface="";
$repos="";
$score="";
$dataArray= array();
$nameArray= array();
$surfArray= array();
$repoArray= array();
$scoreArray= array();
$resource = mysql_connect("localhost", "lepetit", "qGHu5K8MhY4q");
mysql_select_db("lepetit_tigaprove", $resource);
$res = mysql_query('select * from yourfitness_comprofiler');
while($row = mysql_fetch_assoc($res)) {
if ($row[user_id] ==$utente){
//nel primo ciclo cancelliamo i testi e acquisizione variabili
$m="".$row[cb_dates]."".$row[cb_tournament_name]."".$row[cb_surface]."".$row[cb_repos]."".$row[cb_scores];
$dates=$row[cb_dates];
$tournament=$row[cb_tournament_name];
$surface=$row[cb_surface];
$repos=$row[cb_repos];
$score=$row[cb_scores];
}
}
$resulto = mysql_query ('select * from yourfitness_tornei');
while (($row = mysql_fetch_assoc ($resulto))) {
$m1[$p] = "".$row[cb_use]."";
}
$q=$p-1;
if ($m!=$m1[0]){
mysql_select_db('lepetit_tigaprove');
$toinsert = "INSERT INTO yourfitness_tornei
(user_id,cb_dates,cb_tournament_name,cb_surface,cb_repos,cb_scores,cb_use)
VALUES
('$utente','$dates','$tournament','$surface','$repos','$score','$m')";
mysql_query($toinsert);
}
$result = mysql_query('select * from yourfitness_tornei');
while (($row = mysql_fetch_assoc($result))) {
if ($row[user_id] ==$utente){
//nell'ultimo ciclo
$dataArray[$i]=$row[cb_dates];
$tournamentArray[$i]=$row[cb_tournament_name];
$surfArray[$i]=$row[cb_surface];
$repoArray[$i]=$row[cb_repos];
$scoreArray[$i]=$row[cb_scores];
$i++;
}
}
$cont=1;
while ($cont<8){
$i=$i-1;
if ($i>0){
echo "<table style='width: 50%;'>";
echo "<tr><td style='background: #e9ff46; border-radius: 17px;'><b> 'cb_dates' :</b> " .$dataArray[$i]."</td></tr> <tr><td style='background: #e9ff46;border-radius: 17px;'><b>Tournament name: </b> ".$tournamentArray[$i]."</td></tr> <tr><td style='border-bottom: 2px solid #e9ff46;'><b>Surface: </b> ".$surfArray[$i]."</td></tr> <tr><td style='border-bottom: 2px solid #e9ff46;'><b>Tournoi/Repos/Preparation? </b>".$repoArray[$i]." </td></tr> <tr><td style='border-bottom: 2px solid #e9ff46;'><b>Resultats et scores: </b>".$scoreArray[$i];
echo "</td></tr></table>";
echo '<br>';
}
$cont++;
}
?>
</body>
</html>
Please Log in to join the conversation.