Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente bannato
    Registrato dal
    Feb 2011
    Messaggi
    165

    problema mysql_data_seek.

    Salve, ho un problema con mysql_data_seek in un esempio che ho trovato su internet,

    mi dite come posso risolvere questo Warning?

    Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 3 is invalid for MySQL result index 5 (or the query data is unbuffered) in D:\xampp\htdocs\directory\submitlink.php on line 121


    e il suo codice che viene richiamato e cosi:
    traverse(0,0,$selcat2);

    codice:
    Codice PHP:
    <?php
    function traverse($root$depth$sql

         
    $row=0
         while (
    $acat mysql_fetch_array($sql)) 
         { 
              if (
    $acat['CatParent'] == $root
              { 
                   print 
    "<option value='" $acat['CatID'] . "'>"
                   
    $j=0
                   while (
    $j<$depth
                   {     
                         print 
    "";
                        
    $j++; 
                   } 
                   if(
    $depth>0)
                   {
                     print 
    "-";
                   }
                   print 
    $acat['CatName'] . "</option>"
                   
    mysql_data_seek($sql); 
                   
    traverse($acat['CatID'], $depth+1,$sql); 
                    
              } 
              
    $row++; 
              
    mysql_data_seek($sql,$row); 
               
         } 
    }
    da errore qui : mysql_data_seek($sql,$row);
    e qui:
    mysql_data_seek($sql);
    grazie mille.

  2. #2
    Utente bannato
    Registrato dal
    Feb 2011
    Messaggi
    165
    scusate ho risolto... ho copiato male l'esempio.

    scusate il disturbo.

    grazie mille.

  3. #3
    Utente bannato
    Registrato dal
    Feb 2011
    Messaggi
    165
    niente mi da i avvisi all'ultimo codice ovvero:
    mysql_data_seek($sql,$row);

    Mi dite come posso risolvere?

    grazie mille.

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.