The statement is about this.
$sql = "SELECT * from team where number between and 60";
Res=mysql_query ($sql);
while ($row =mysql_fetch_array ($res))
{
echo $row ["name"];
}
I was wondering, executing this program using CMD, and then I found that the while statement did not execute
Ask the great God for advice.
And why does the direct echo $row display the word array?
PHP Small white really ask for advice.
Hope great God Enlighten
Reply to discussion (solution)
$res = mysql_query ($sql, database connection Resource);
Although the second value is not required, your while cannot be executed, obviously while is false. The database data could not be obtained.
$row is an array, echo does not output an array, output what.
echo $row the words "array" is displayed because $row is an array.
To look at this, you should be able to list the records of the query.
$sql = "SELECT * from Team where number between", $res =mysql_query ($sql), $result = Array (), while ($row =mysql_fetch_ Array ($res)) {$result [] = $row;} Print_r ($result);