Hello,

I've got a really strange problem.

When looping through a result given by mysql_fetch_row(),
the code for some reason ignores the last column in the database.

The code snippet I'm using now is


while($row=mysql_fetch_row($result)) {

        print("<TR>");

        for($i=0;$i<7;$i++) {
                print("<TD>");
                if($row[$i]=="") {
                        print("<P ALIGN=\"CENTER\"><B>N/A</B></P>");
                        }
                else {
                printf("<P ALIGN=\"CENTER\">%s</P>", $row[$i]);
                }
        print("</TD>");
        }
print("</TR>");
}

The database has got eight columns, and I can't for the world figure
out why it doesn't work. I have exactly the same problem with another
PHP-app that I'm developing, too, so if someone has got a solution to
my problem, I'd probably get the other app working too.

What is it I'm missing, or am I just stupid?
I opt for the second choice. :)


Cheers,
Markus


-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to