可能性の重複:ターミナルで
MySQL returns only one row
Mysqlの結果とPHPの結果は同じではありませんか?
mysql> select image,title,price from test;
デシベル結果:
image title price
1 2 3
4 5 6
しかし、
.
.
$query=mysql_query("select image,title, price from test",$connect);
$row=mysql_fetch_object($query);
print json_encode($row);
結果PHPで:
image= 1, title = 2 , price=3
なぜ印刷されません画像= 4タイトル= 5価格= 6? ?
while ($row = mysql_fetch_object($result)) {
...
}
ごめんなさい。私は答えを受け入れる方法を知りませんでした。します。 –