喜悦国际村 
» 游客:  注册 | 登录 | 搜索 | 统计 | 帮助

RSS 订阅当前论坛  

喜悦证交所已经关闭

上一主题 下一主题
 17  1/2  1  2  > 
     
标题: 又有一个新问题请教  
 
apple_lucky (apple_lucky)
新手上路
Rank: 1
一般会员



UID 28831
精华 0
积分 49
帖子 49
金钱 49 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2004-5-25
状态 离线
又有一个新问题请教

怎么这会数据库的内容在前台又显示不出来了
我知道我很菜
可是我很想学的
这是我的任务哦
2004-7-21 05:28 PM#1
查看资料  发短消息  顶部
 
apple_lucky (apple_lucky)
新手上路
Rank: 1
一般会员



UID 28831
精华 0
积分 49
帖子 49
金钱 49 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2004-5-25
状态 离线
[推荐阅读] 你应该来看看 多语音视频和视频会议功能的MeChatX
是不是要把程序放上去啊?
2004-7-21 05:36 PM#2
查看资料  发短消息  顶部
 
hotsun (hotsun)
中级会员
Rank: 3Rank: 3
老会员



UID 27471
精华 0
积分 343
帖子 343
金钱 343 喜悦币
威望 0
人脉 0
阅读权限 30
注册 2004-4-2
状态 离线
[推荐阅读] 哪位大侠有crm的资料啊?
说清楚一点,用echo看有没有数据
2004-7-21 05:36 PM#3
查看资料  发短消息  顶部
 
apple_lucky (apple_lucky)
新手上路
Rank: 1
一般会员



UID 28831
精华 0
积分 49
帖子 49
金钱 49 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2004-5-25
状态 离线
[推荐阅读] 怎样返回上一页!
<head>
<meta http-equiv="Content-Type" content="text/html; charset=??????">
<title>动态显示新闻</title>
</head>
<body background="D:\AppServ\www\appserv\023.gif">

<?
//建立与数据库服务器的连接
  $cn=@mysql_connect('localhost','root','')
     or die("不能连接数据库服务器");
//每页显示10行
  $pagesize=10;
//定义SQL语句,该语句按编号的递减次序从news表中选出所有新闻
  $strSQL="select * from news order by NID desc";
//发送strSQL语句
  $result=@mysql_db_query("ls_news",$strSQL,$cn);
?>
  
  <table border="0" cellpadding="3" cellspacing="0" width="50%" height="100">
   <tbody><tr><td align="left" valign="top" width="30%" height="71">
   <table border="0" width="100%" height="150">
   <tr><td width="100%" height="14"><p align="center">
   <font color="#FF0000">国际新闻</font></td></tr>
   </table>
   </td>

<?
//循环显示每条新闻
while ($arr=@mysql_fetch_array($result)){
if($arr[ispic]==1){
echo "<tr><td width='100%' height='160'><p>"."<img src='.\\pic\\$arr[picfile]'    width='135' height='120'>"."</p><p><a href='disp.php?NID=$arr[NID]'>".$arr[title]."</a></p></td></tr>";
        }
}
?>


<td valign="top"  width="70%" height="100">
<table border="0" width="100%" height="70">
<tr><td width="100%" height="17" valign="top">
<p align="center"><font color="#FF0000">热点新闻</font></td></tr></tr>
<td width="100%" height="176" valign="top">

<?
//移回第一条新闻处
//循环显示每条热点新闻
@mysql_data_seek($result,0);
while ($arr=@mysql_fetch_array($result))
         {
        if($arr[ishot]==1)
                {
                echo "<font color='#FF0000'>".
                        "<img border='0' src='.\image\ball.gif'".
                        "width='15' height='15'></font>".
                    "<a href='disp.php?NID=$arr[NID]'></a>".
                        $arr[title]."</a><font color='red' size='1'>(".
                        $arr[newsdate].")</font><br>";
        }
}
?>

<tr><td width="100%" height="18">
<div align="right">
<table border="2" width="90" cellspacing="0">

<tr><td width="100%"><p align="center">
<a href="others.php"><font color="#FF0000">更多新闻</font></a>
</td></tr></table>
</div></td></tr>

</body>

<?php
//关闭连接
mysql_close($cn);
?>
<html>
2004-7-21 05:50 PM#4
查看资料  发短消息  顶部
 
hotsun (hotsun)
中级会员
Rank: 3Rank: 3
老会员



UID 27471
精华 0
积分 343
帖子 343
金钱 343 喜悦币
威望 0
人脉 0
阅读权限 30
注册 2004-4-2
状态 离线
[推荐阅读] 挥泪求php_gd_gif.dll
<?
//循环显示每条新闻
while ($arr=@mysql_fetch_array($result)){
if($arr[ispic]==1){
echo "<tr><td width='100%' height='160'><p>"."<img src='.\\pic\\$arr[picfile]' width='135' height='120'>"."</p><p><a href='disp.php?NID=$arr[NID]'>".$arr[title]."</a></p></td></tr>";
}
}
?>
是这个没显示吗?在mysql中执行一下sql看有没有数据
2004-7-21 05:59 PM#5
查看资料  发短消息  顶部
 
apple_lucky (apple_lucky)
新手上路
Rank: 1
一般会员



UID 28831
精华 0
积分 49
帖子 49
金钱 49 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2004-5-25
状态 离线
[推荐阅读] 痛死俺了!!!
我在数据库已经添加了数据了
2004-7-21 06:10 PM#6
查看资料  发短消息  顶部
 
apple_lucky (apple_lucky)
新手上路
Rank: 1
一般会员



UID 28831
精华 0
积分 49
帖子 49
金钱 49 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2004-5-25
状态 离线
[推荐阅读] 表单提交数据问题
怎么没有人帮帮我啊
我在线等
希望各位大侠给予帮助
2004-7-21 10:52 PM#7
查看资料  发短消息  顶部
 
js5131 (js5131)
中级会员
Rank: 3Rank: 3
Banned



UID 29024
精华 0
积分 280
帖子 280
金钱 280 喜悦币
威望 0
人脉 0
阅读权限 30
注册 2004-5-31
状态 离线
[推荐阅读] 关于调用其他php并返回结果。
是哪一块的内容没有显示?
2004-7-21 11:02 PM#8
查看资料  发短消息  顶部
 
apple_lucky (apple_lucky)
新手上路
Rank: 1
一般会员



UID 28831
精华 0
积分 49
帖子 49
金钱 49 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2004-5-25
状态 离线
[推荐阅读] 图片显示问题》》》》急!!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=??????">
<title>动态显示新闻</title>
</head>
<body background="D:\AppServ\www\appserv\023.gif">

<?
//建立与数据库服务器的连接
  $cn=@mysql_connect('localhost','root','')
     or die("不能连接数据库服务器");
//每页显示10行
  $pagesize=10;
//定义SQL语句,该语句按编号的递减次序从news表中选出所有新闻
  $strSQL="select * from news order by NID desc";
//发送strSQL语句
  $result=@mysql_db_query("ls_news",$strSQL,$cn);
?>
  
  <table border="0" cellpadding="3" cellspacing="0" width="500" height="100">
   <tbody><tr><td align="left" valign="top" width="30%" height="71">
   <table border="0" width="100%" height="150">
   <tr><td width="100%" height="14"><p align="center">
   <font color="#FF0000">国际新闻</font></td></tr>
   </table>
   </td>

<?
//循环显示每条新闻
while ($arr=@mysql_fetch_array($result)){
        if($arr[ispic]==1){
                echo "<tr><td width='100%' height='160'><p>".
                        "<img src='.\\pic\\$arr[picfile]' width='135' height='120'>".
                        "</p><p><a href='disp.php?NID=$arr[NID]'>".
                        $arr[title]."</a></p></td></tr>";
        }
}
?>

</table></td>
<td valign="top"  width="70%" height="100">
<table border="0" width="100%" height="70">
<tr><td width="100%" height="17" valign="top">
<p align="center"><font color="#FF0000">热点新闻</font></td></tr></tr>
<td width="100%" height="176" valign="top">

<?
//移回第一条新闻处
//循环显示每条热点新闻
@mysql_data_seek($result,0);
while ($arr=@mysql_fetch_array($result))
{
if($arr[ishot]==1)
{
echo "<font color='#FF0000'>".
"<img border='0' src='.\image\ball.gif'".
"width='15' height='15'></font>".
"<a href='disp.php?NID=$arr[NID]'></a>".
$arr[title]."</a><font color='red' size='1'>(".
$arr[newsdate].")</font><br>";
}
}
?>
</td></tr>
<tr><td width="100%" height="18">
<div align="right">
<table border="2" width="90" cellspacing="0" bgcolor="#FFFF00"
bordercolordark="0" bordercolorlight="#3399FF">

<tr><td width="100%"><p align="center">
<a href="others.php"><font color="#FF0000">更多新闻</font></a>
</td></tr></table>
</div></td></tr>

</body>

<?php
//关闭连接
mysql_close($cn);
?>
<html>


我数据库里所有新闻都没有显示出来
不过国际新闻和热点新闻都打不开
2004-7-21 11:22 PM#9
查看资料  发短消息  顶部
 
apple_lucky (apple_lucky)
新手上路
Rank: 1
一般会员



UID 28831
精华 0
积分 49
帖子 49
金钱 49 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2004-5-25
状态 离线
[推荐阅读] 如何判断所需文件是否存在?
echo "<tr><td width='100%' height='160'><p>".
            "<img src='.\\pic\\$arr[picfile]' width='135' height='120'>".
              "</p><p><a href='disp.php?NID=$arr[NID]'>".
                $arr[title]."</a></p></td></tr>";

echo "<font color='#FF0000'>".
"<img border='0' src='.\image\ball.gif'".
"width='15' height='15'></font>".
"<a href='disp.php?NID=$arr[NID]'></a>".
$arr[title]."</a><font color='red' size='1'>(".
$arr[newsdate].")</font><br>";

这几句有问题
2004-7-21 11:26 PM#10
查看资料  发短消息  顶部
 17  1/2  1  2  > 
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 




Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 0.069309 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP