Hello,
I am new to php and MySQL and I'm attempting to run a select query on a
MySQL database which is working fine except prior to displaying the table
with the results from the select query it displays 1 line for each row in
the database containing only the word Array. This is then followed by the
correct results in the constructed table. I am not storing the string
"Array" in my table.
Following is the PHP code for constructing the table from the results
variable.
for ($i = 0; $i < mysql_num_rows( $result); $i++)
{
echo "<tr>";
echo $row = mysql_fetch_row ($result);
for ($j = 0; $j < mysql_num_field s($result); $j++)
{
echo("<td>" . $row[$j] . "</td>");
}
echo "</tr>";
}
I hope this is enough of the PHP script to solve the problem
TIA
Vic
I am new to php and MySQL and I'm attempting to run a select query on a
MySQL database which is working fine except prior to displaying the table
with the results from the select query it displays 1 line for each row in
the database containing only the word Array. This is then followed by the
correct results in the constructed table. I am not storing the string
"Array" in my table.
Following is the PHP code for constructing the table from the results
variable.
for ($i = 0; $i < mysql_num_rows( $result); $i++)
{
echo "<tr>";
echo $row = mysql_fetch_row ($result);
for ($j = 0; $j < mysql_num_field s($result); $j++)
{
echo("<td>" . $row[$j] . "</td>");
}
echo "</tr>";
}
I hope this is enough of the PHP script to solve the problem
TIA
Vic
Comment