Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    dividere i dati per pagina

    ciao ragazzii
    io ho questo codice che mi stampa tutti i record presenti nella tabella

    Codice PHP:
    $giorno getdate();
    $giornog $giorno['year'] . "-" $giorno['mon'] . "-" $giorno['mday'];
    //begin recordset
    $query_video_hits "SELECT * FROM video_hits WHERE dal<='" $giornog ."' AND al>='" $giornog ."' ORDER BY id_video ASC";
    $video_hits $company->SelectLimit($query_video_hits) or die($company->ErrorMsg());
    $totalRows_video_hits $video_hits->RecordCount();
    //end recordset




    while (!$video_hits->EOF) {

    echo (
    "
    <div id=\"cella_video\" style=\"float:left; width:270px; height:85px;\"><table width=\"270\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
      <tr>
        <td width=\"120\" height=\"80\"><a href=\"?source_video="
    $video_hits->Fields('link') ."\" target=\"_self\"><img src=\"http://www.giorgiotave.it/forum/images/videohits/"$video_hits->Fields('immagine') ."\" width=\"120\" height=\"80\" border=\"0\" /></a></td>
        <td width=\"145\"  class=\"ali\" style=\"padding-left:5px;\">[b]Posizione "
    $video_hits->Fields('posizione') ."[/b]

          
    "
    $video_hits->Fields('artista') ."
    "
    $video_hits->Fields('titolo') ."

          [b]<a href=\"?source_video="
    $video_hits->Fields('link') ."\" target=\"_self\">Guarda il video &gt;&gt;</a>[/b]</td>
        <td width=\"5\"></td>
      </tr>
      <tr>
        <td height=\"5\" colspan=\"3\"></td>
        </tr>
    </table>
    </div>"
    );



    $video_hits->MoveNext();
    }



    $video_hits->Close();
    ?> 

    come posso fare per fare in modo che dopo 10 stampe mi crei un link con la seconda pagina ?

  2. #2

  3. #3
    ti ringrazio....
    ho provato ad applicare il limit

    Codice PHP:
    $query_video_hits "SELECT * FROM video_hits WHERE dal<='" $giornog ."' AND al>='" $giornog ."' ORDER BY id_video ASC LIMIT 0, 4"

    ma mi da errore

    codice:
    ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.