谁帮我看一下下面的程式到底哪儿出了问题?谢谢! $showpost="<a href=/test/test10.php?no=$row >$a<br></a>";中$row 在循环内始终为1,这里的no似应为结果集的顺序号 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 no=8 => no result? WHY?? THX !<?phpinclude("/news/config.php");include("/fasttemplate/class.fasttemplate.php3");$tpl=new FastTemplate("d:\\web\\apache2\\htdocs\\fasttemplate\\templates");//$tpl=new FastTemplate("/fasttemplate/templates");$tpl->define(array(main=>"show.tpl"));$tpl->define_dynamic("row","main");$qry="SELECT a.subject aa,a.url bb,b.message cc FROM news_subject a,news_content b where b.no=a.no and a.no=$no ";ora_parse($cursor,$qry);ora_exec($cursor);//$numrows=0; //$w_numcols=ora_numcols($cursor); while(ora_fetch($cursor)) { for($i=0;$i<$w_numcols;$i++){ $a=ora_getcolumn($cursor,$i); } $tpl->assign(SUBJECT,$aa); $tpl->assign(URL,$bb); $tpl->assign(MESSAGE,$cc); $tpl->parse(ROWS,".row"); } $tpl->parse(BODY,"main");$tpl->FastPrint("BODY"); ora_logoff($conn); ?> Come HERE !GIVE U point! $qry="SELECT subject||'('||to_char(postdate,'MM-DD HH24:MI')||')',no FROM news_subject where no in (select no from news_content) ";......for($i=0;$i<$w_numcols-1;$i++){ $a=ora_getcolumn($cursor,$i); $b=$w_numcols-1; $c=ora_getcolumn($cursor,$b); } $showpost="<a href=/test/test10.php?no=$c>$a<br></a>";while(ora_fetch($cursor)) { $a1=0;$a2=1;$a3=2; $aa=ora_getcolumn($cursor,$a1); $bb=ora_getcolumn($cursor,$2); $cc=ora_getcolumn($cursor,$a3); $tpl->assign(SUBJECT,$aa); $tpl->assign(URL,$bb);....... 大家晒下自己的数据库类啦...让我等菜鸟学习一下啦... php里Cannot unset string offsets in是什么错误 如何解决列表和内容在同一页面显示 php unpacke 哪位知道哪里有eclipse3.2.1的PHP的插件下载? php怎么格式化输出TEXT类型数据 php unlink 函数权限问题 这句话什么意思,应该怎么解决?谢谢了,急!!! 很菜的问题mysql_db_query和mysql_query在功能上有什么区别 经典难题,请指教 关于imap_open()和INBOX的问题 又一个好东西
include("/fasttemplate/class.fasttemplate.php3");
$tpl=new FastTemplate("d:\\web\\apache2\\htdocs\\fasttemplate\\templates");
//$tpl=new FastTemplate("/fasttemplate/templates");$tpl->define(array(main=>"show.tpl"));
$tpl->define_dynamic("row","main");
$qry="SELECT a.subject aa,a.url bb,b.message cc FROM news_subject a,news_content b where b.no=a.no and a.no=$no ";ora_parse($cursor,$qry);
ora_exec($cursor);
//$numrows=0;
//$w_numcols=ora_numcols($cursor); while(ora_fetch($cursor))
{
for($i=0;$i<$w_numcols;$i++){
$a=ora_getcolumn($cursor,$i);
}
$tpl->assign(SUBJECT,$aa);
$tpl->assign(URL,$bb);
$tpl->assign(MESSAGE,$cc);
$tpl->parse(ROWS,".row");
} $tpl->parse(BODY,"main");
$tpl->FastPrint("BODY");
ora_logoff($conn);
?>
for($i=0;$i<$w_numcols-1;$i++){
$a=ora_getcolumn($cursor,$i);
$b=$w_numcols-1;
$c=ora_getcolumn($cursor,$b);
}
$showpost="<a href=/test/test10.php?no=$c>$a<br></a>";
while(ora_fetch($cursor))
{
$a1=0;$a2=1;$a3=2;
$aa=ora_getcolumn($cursor,$a1);
$bb=ora_getcolumn($cursor,$2);
$cc=ora_getcolumn($cursor,$a3);
$tpl->assign(SUBJECT,$aa);
$tpl->assign(URL,$bb);.......