Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] Wyświetlanie kilka rekordów
poki2003
post
Post #1





Grupa: Zarejestrowani
Postów: 17
Pomógł: 0
Dołączył: 24.09.2006

Ostrzeżenie: (0%)
-----


Witam serdecznie smile.gif

Mam taka funkcje
  1. <?php
  2. function getNextGame1() {
  3.  global $dbaseMatchData, $SID, $Next_Match,$No_Matches_Scheduled,$lid;
  4.  global $dbase, $globalTeams, $dbaseLids;
  5.  
  6.  $todaysdate = date("Y-m-d H:i:s");
  7.  $tz = date("T");
  8.  
  9.  $query = "select * from $dbaseMatchData inner join $dbaseLids on $dbaseMatchData.lid=
    $dbaseLids.lid where matchdate>='$todaysdate' order by matchdate LIMIT 5"
    ;
  10.  $result = $dbase->query($query);
  11.  
  12.  $count = mysql_num_rows($result);
  13.  
  14.  if ($count == 0) {
  15.  $nextmatch = "<b>$No_Matches_Scheduled</b>";
  16.  } else {
  17.  
  18.  $line = mysql_fetch_array($result, MYSQL_ASSOC);
  19.  $matchid = $line["matchid"];
  20.  $matchleague = $line["title"];
  21.  $matchdate = $line["matchdate"];
  22.  $textdate = convertDatetimeToScreenDate($matchdate);
  23.  $hometeam = stripslashes($line["hometeam"]);
  24.  $awayteam = stripslashes($line["awayteam"]); 
  25.  $nextmatch = "<div style='widht= 580px;border= 2px dashed red; background-color= #e0f8b0;'><center><table><tr><td>$matchleague</td><td>$hometeam</td><td>-</td><td>$awayteam</td> <td>$textdate</td></tr></table></center> </a></b></div>";
  26.  }
  27.  
  28.  
  29.  return $nextmatch;
  30. }
  31. ?>


Wyświetla jeden wynik (mecz) tylko ...

Mam prośbe do ekspertów z tego forum
Czy można zrobić i w jaki sposób by wyświetlało np . 5 rekordów (meczy )

Prosze o pomoc...

Ten post edytował poki2003 24.10.2006, 13:24:48
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 12:05