I'm hoping someone can help me with this.  I am having
problems with the mysql_fetch_array function in PHP
5.0.1 - the code listed below works fine with PHP

Here is my setup:

A DB class file that has the following for the
mysql_fetch_array (I know this function is OK because
its working when I call it in another section of

        function fetchArray() {

I have another class file called ListRecords that
basically creates a table and lists the records in
that table.  For some reason it is never getting
inside the first while statement:

        function buildTable($num_fields, $field_name, $db) {
                // This is where it is dying
                while($query_data = $db->fetchArray()) {
                        echo "<tr>\n";
                        $count = 0;
                        while($count < $num_fields) {
                                $id = $query_data["$field_name[0]"];
                                $field = $query_data["$field_name[$count]"];

                                echo "<td align=\"center\">$field</td>\n";
                        echo "<td align=\"center\"><a
                        echo "</tr>\n";
                echo "</table>";

The actual file that calls all of this stuff does so
with the following:

$listrecords->buildTable($num_fields, $field_name,

When I pull up the page I get no results, but I know I
am connecting to the database because I have a paging
function that is connecting to the db and returning

I've gone through the change log for PHP 5 and didn't
see anything that might be causing this, but maybe I
missed something.  If someone knows what is causing
this it would be extremely appreciated.

Thanks in advance.

Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to