作者johnney (You make me Complete!)
看板PHP
标题Re: [请益] mysql取出资料的问题
时间Sun Jan 22 11:08:24 2006
※ 引述《gsrr (谁要下象棋的jJBRkIxQkVF)》之铭言:
: $result=mysql_query("SELECT * FORM nervebook");
: $row=mysql_fetch_row($result);
: while ($row != null){
: list($id,$username,$mail_address,$date,$message)=$row;
: echo <<<EOD
: 出现错误讯息
: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
: result resource in C:\AppServ\www\message\index2.php on line 16
: 请问各位大大...哪里需要更改呢...
: 还有...echo<<<EDO 这行是代表什麽意思?
: 谢谢..
1.建议翻书出来看一下 mysql 的函式使用方式
2.你应该在 mysql_query 之後跑回圈将资料一笔一笔用 mysql_fetch_row 抓出来
3.echo <<<EDO 是跟後面的 EDO; 为一组的
只是单纯的将中间包含的所有字元 output 出来
底下是 php.net 的说法
echo <<<END
This uses the "here document" syntax to output
multiple lines with $variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon. no extra whitespace!
END;
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.119.170.182