我正在阅读本教程
http://www.1stwebdesigner.com/tutorials/infinite-scrolling-tutorial/
它包含以下代码片段:
<!--?php
$con = mysql_connect("localhost", "username", "password");
mysql_select_db("database_name");
$result = mysql_query("select SQL_CALC_FOUND_ROWS * from scroll_images order by id asc limit 12");
$row_object = mysql_query("Select Found_Rows() as rowcount");
$row_object = mysql_fetch_object($row_object);
$actual_row_count = $row_object--->rowcount;
?>
这条线$actual_row_count = $row_object--->rowcount;
让我很困惑,--->rowcount
应该怎么做?当我在我的 PHP 中有它时,我收到错误。
<?php
$sql_fetch = "SELECT * FROM articles ORDER BY time DESC limit 4;";
$dbresult = mysqli_query( $db, $sql_fetch );
$row_object = mysqli_query( $db, "Select Found_Rows() as rowcount" );
$row_object = mysqli_fetch_object( $row_object );
$actual_row_count = $row_object--->rowcount;
?>
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /Applications/MAMP/htdocs/index.php on line 14