Re: php err msg/issue...
| From: | Curt Zirzow | Date: | Wed, 13 Oct 2004 20:39:50 +0000 |
| Subject: | Re: php err msg/issue... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199435@lists.php.net to get a copy of this message | ||
* Thus wrote bruce:
> curt...
>
> when i print $rs, i get the following:
> displaying $rs shows that $rs is:
>
> ResultSet Object (
>....
> [rows] => Array ( )
> <<<<<<<<<<<<<<<
> [pos] => 0
> <<<<<<<<<<<<<<<<<
>...
> when i print $rs->pos, i get '0'
>
> so are you saying that the code can't handle '$rs->rows[0] = $rec'
Thats different than what you originally had:
$rs->rows[0]->fields = $rec
php is being friendly and creating an object before assigning the
variable (to a non-existing array element). The error you are
getting is because you have E_STRICT included in your
error_reporting level.
;E_STRICT - run-time notices, enable to have PHP suggest changes
to your code which will ensure the best interoperability
and forward compatibility of your code
> if this is the case, how can this be corrected....
$rs->rows[0] = new stdClass();
$rs->rows[0]->fields = $rec;
Curt.
--
Quoth the Raven, "Nevermore."