这就是我所拥有的:
<?php
$db_host = "localhost";
$db_username = "root";
$db_pass = "";
$db_name = "OnlineBulletinBoardDB";
@mysql_connect("$db_host","$db_username","$db_pass") or die ("Could no connect to MySQL");
@mysql_select_db("$db_name") or die ("No database");
$query="SELECT PostSubject, FROM postings;";
$result=mysql_query($query);
mysql_close();
?>
<H1>Post Subject</H1>
<?php echo mysql_num_rows($result); ?>
但它不起作用,当我尝试运行时,它在最后一行给了我一些错误。
有什么想法吗?