Closed skakz closed 9 years ago
I think you missed a step
'''''' $table2->reset() '''''' before '''''' $table2->load() ''''''
usually this should work. cursor pointer is resetted right here: https://github.com/bcosca/fatfree/blob/master/lib/db/cursor.php#L150 $this->ptr=0
I saw that line of code, and this is why I think that resetting the cursor before invoking the load function shouldn't be necessary. However this doesn't work in my case. In debug mode I clearly see that $ptr is still different from zero after the load. Is there anything I can do for better investigating this problem?
load() can retrieve more than one record. Your query needs to be reconstructed.
Since we do not have enough info to reproduce this issue and no follow-up comment was posted, please reopen if this issue persists in current version.
Hi my code looks like this: (please I know that the following code can be done with a simple join, but this is not relevant in this case)
when $table2 is loaded for the SECOND time (with a different condition), $table2->dry() is true and the second while loop is never called. This is appening because cursor->prt (cursor current position) is not 0 after load(). I don't know if this is a desired behavior however if you reset the cursor before the load() it works fine. But I think that this should be automatic when you load a new record.
Thank you.