- 论坛徽章:
- 0
|
<?php
$mysql_server_name="localhost";
$mysql_username="root";
$mysql_password="";
$mysql_database="survey";
$conn=mysql_connect($mysql_server_name, $mysql_username,$mysql_password);
$strsql="select * from a where c='1'";
$result=mysql_db_query($mysql_database, $strsql, $conn);
$row=mysql_fetch_row($result);
@mysql_data_seek($result, 0);
while ($row=mysql_fetch_row($result))
{
echo "<tr>\n";
for ($i=0; $i<mysql_num_fields($result); $i++ )
{
echo "$row[$i]";
}
echo "</tr>\n";
}
mysql_free_result($result);
mysql_close();
?>
这段代码是让我数据库的值显示在我的PHP的页面里,我现在做了个html的页面,那个页面有的地方需要显示数据库的值。
<?php foreach ($this->paginator as $mastiff); ?> 求解 $this->什么意思 |
|