Problem: mysql_data_seek()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem: mysql_data_seek()

    Hallo,

    ich erhalte eine Fehlermeldung, weiß aber nich wieso und was diese zu bewirken hat, weil eigentlich funktionier alles prima, will aber dennoch sicher gehen, dass es sich dabei um nichts schlimmes handelt, würde mich freuen wenn mir einer helfen könnte.

    Fehlermeldung:
    PHP Code:
    <b>Warning</b>:  mysql_data_seek(): Offset 6 is invalid for MySQL result index 11 (or the query data is unbufferedin <b>E:\xampp\htdocs\web\upload_hinzufuegen.php</bon line <b>134</b
    Mein code:
    PHP Code:
    print "<select name='category'>";
      
    $selcat="SELECT * from cl_categories order by CatName ASC";
      
    $selcat2=mysql_query($selcat) or die("Could not select category");
      
    traverse(0,0,$selcat2);
      print 
    "</select><br><br>"
    und:

    PHP Code:
    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 
    "&nbsp;&nbsp;";
                        
    $j++; 
                   } 
                   if(
    $depth>0)
                   {
                     print 
    "-";
                   }
                   print 
    $acat['CatName'] . "</option>"
                   
    mysql_data_seek($sql,0); 
                   
    traverse($acat['CatID'], $depth+1,$sql); 
                    
              } 
              
    $row++; 
                 
                 
    mysql_data_seek($sql,$row); 
               
         } 

    Danke.

  • #2
    Bitte lies und befolge unsere Regeln und brich deinen Code um. Danke.

    Die Fehlermeldung ist gar keine sondern nur eine Warnung. Dennoch solltest du ihrem Ursprung auf den Grund gehen. Fang am besten mit dem Manual zu mysql_data_seek an.

    Comment

    Working...
    X