[Solar-talk] fetchRowset - method not implemented

Rodrigo Moraes rodrigo.moraes at gmail.com
Mon Oct 15 05:10:22 CDT 2007


On 10/15/07, Jeff Surgeson wrote:
> Had to also comment out the following on line 143 as it generates a Fatal
> error: Call to a member function current() on a non-object
>
> // set optional info from optional cols
> $row = $rows->current();
> foreach ($optional as $key => $val) {
>         if ($this->_config[$val]) {
>                 $info[$key] = $row[$this->_config[$val]];
>         }
> }
>
> But with your change and my comment out it appears to work, although I am sure
> that my mod is not the way to go, please advise?

Use just $rows[0] instead of $rows->current(). This would be perfectly fine.

This is not related to your problem, but now, thinking on it, if the
system was messed and has more than one record with the same handle,
it'd not hurt to limit the select to return only *two* records. If
there are more than one, it means 'fail' anyway, no matter how many
records were found. So I'd also add ->setPaging(2) to the select.

-- rodrigo


More information about the Solar-talk mailing list