|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-05-01 17:21 UTC] mark at artshouse dot com
[2002-05-01 17:23 UTC] mark at artshouse dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 19:00:01 2025 UTC |
This was found in an ongoing project I am upgrading from php 4.0.4pl1 code sample: $sql='select prodId, prodNum from products'; $result = mysql_query($sql); do { print_r($product); print $product->prodId ." ". $product-prodNum } while ($product = mysql_fetch_object($result)); print_r ($product) returns: stdClass Object ( [prodId] => [prodNum] => E-U-00-002) stdClass Object ( [prodId] => [prodNum] => E-U-00-003) stdClass Object ( [prodId] => [prodNum] => E-U-00-004) the real data would be prodId => 1, prodId => 2 the same thing done with mysql_fetch_array works perfectly (exact same sql, etc) I tried various loops (do..while, if, while) no changes. Tested this with php 4.1.2 and 4.2.0 w/ same errors. Works fine on 4.0.4pl1. php configure options as follows: './configure' \ '--with-mysql=/usr/local' \ '--enable-track-vars' \ '--with-dbase' \ '--with-gd=/usr/local/gd-1.8.4' \ '--with-ttf' \ '--with-t1lib' \ '--with-jpeg-dir' \ '--with-png-dir' \ '--with-tiff-dir' \ '--with-apxs=/usr/local/apache/bin/apxs' \ '--with-config-file-path=/usr/local/apache/conf' \ '--with-pdflib' \ '--enable-ftp' \ '--with-zlib-dir' I am unable to provide a backtrace (production server, sorry)