title: Reset MySqli pointer?
body: <p>I'm struggling a bit with resetting a pointer. I want to do this because I'm going to use the same query twice in the same script. As far as I can work out I can do this with resetting the pointer after I've looped trough the fetched array. If there is a better way to do this, I'd love to hear it.</p>
  
  <p>Anyway, this is what I got.</p>
  
  <pre><code>$getEvent = $connection-&gt;prepare("SELECT * BLABLA FROM BLABLA");
  
  $getEvent-&gt;bind_param("i", $eventID); 
  
      $getEvent-&gt;execute();
      $getEvent-&gt;bind_result($eventMember, $eventStaff, $eventMemberID, $eventMemberSuper);
  
  while($getEvent-&gt;fetch())
      {
          // Do stuff
      }
  
  // Then bunch of code, before finally another
  
  //$getEvent-&gt;execute(); //Script doesn't work without this and next line
  //$getEvent-&gt;bind_result($eventMember, $eventStaff, $eventMemberID, $eventMemberSuper);
  
   while($getEvent-&gt;fetch())
      {
        // Do other stuff
      }
  </code></pre>
  
  <p>I've tried with <code>$getEvent-&gt;data_seek(0);</code> but no luck. The script only works if I redeclare <code>$getEvent-&gt;bind_result</code>. Thanks in advance for any replies.</p>