Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805

    funzione con query ed limit

    salve ragazzi volevo chiedervi , io ho una query che estraggo i dati dal database, però non riesco ad estrarre i dati.
    questa e la query
    Codice PHP:
        $num_results $result //this value should arrive from some database query, like "select count(id) from table_you_want_to_page" 
        //echo $num_results ;
        
    $per_page 1//number of results to be shown per page
        
    $query_string "class.pager.example.php?"// current file.. 
        
    $pager = new pager($num_results$per_page$query_string); //building a pager
        
    $sql ="SELECT * FROM tech order by staffid asc limit ".$pager->num_results.",".$pager->per_page."";
        
    $query =  mysql_query($sql); 
    e la funzione dentro la classe:
    Codice PHP:
            function pager($num_results$per_page 10$query_string ''$page_id "page") {
                
    $this->page $_REQUEST[$page_id] ? $_REQUEST[$page_id] : 1;
                
    $this->page_identifier $page_id;
                
    $this->per_page $per_page;
                
    $this->num_results $num_results;
                
    $this->query_string $query_string;
                
    $this->page_list_size = @ceil$num_results $per_page );
            } 
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  2. #2
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    ragazzi perfavore datemi una mno e importante sono fermo da tanto per questo problema perfavore confido in voi grazie
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    buo giorno e buona domenica, nessuno riesce ad aiutarmi??
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

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 © 2025 vBulletin Solutions, Inc. All rights reserved.